[Zope-CMF] Re: CVS: CMF/CMFCore/tests - test_OpaqueItems.py:1.2
Gregoire Weber
gregweb at gmx.ch
Fri Jan 2 10:05:55 EST 2004
Hi Tres,
Last summer while programming on CMFCollection I needed
unique ids. I run into the problem that the unique id got
doubled on copying (which is bad ...).
So I decided to make the uid a callable opaque item like
'talkback' is. But then I recognized that only the 'talkback's
manage_after* and manage_before* hooks get called by CMFCore.
So that didn't help. For a while I lived with a monkey patch
replacing the 'opaqueItems' method.
IMHO a unique id tool should be totaly independent of how
content types are implemented I didn't see another way doing
this cleanly.
Archetypes for example mitigates the same problem by preaching
only to use archetypes based content types. So they can use
their content base classes 'manage_afterClone' hook for this.
I hope I could express my self clearly.
Gregoire
P.S.: Do you remember? We saw us on the zope3 Berlin sprint last
year. I worked in pair with Yvo Schubbe.
P.P.S.: Related posts on the zope-cmf mailing list:
<http://mail.zope.org/pipermail/zope-cmf/2003-August/019190.html>
<http://mail.zope.org/pipermail/zope-cmf/2003-September/019283.html>
<http://mail.zope.org/pipermail/zope-cmf/2003-September/019284.html>
At 07:56 02.01.2004 -0500, Tres Seaver wrote:
>Grégoire,
>
>Can you give me a little more rationale for the "OpaqueItems" changes you have checked in? I am not challenging them, I just want to understand what the goal was, so that I don't stomp on in somewhere else.
>
>Thanks!
>
>Tres.
>--
>===============================================================
>Tres Seaver tseaver at zope.com
>Zope Corporation "Zope Dealers" http://www.zope.com
More information about the Zope-CMF
mailing list