[Zope-dev] CopySupport bug or feature?

Geoff Davis geoff at phds.org
Mon Aug 8 11:05:28 EDT 2005


I have been developing some classes that need to know when they are copied
or moved.  I have been achieving this by adding my own versions of
_notifyOfCopyTo, _postCopy, and manage_afterClone.  Everything works as
expected when you copy / paste an individual object.  However, I have
recently been made aware of a problem with this approach: if you copy not
the object itself, but rather a folder containing the object, only
manage_afterClone is called.  In looking through OFS/CopySupport.py and
OFS/ObjectManager.py, I discovered the source of the problem:
manage_afterClone is called recursively on ObjectManagers, but
_notifyOfCopyTo and _postCopy are not.

Is this intentional?  If not, I'd like to check in a fix.

Geoff





More information about the Zope-Dev mailing list