[Zope-dev] CopySupport bug or feature?
Chris McDonough
chrism at plope.com
Mon Aug 8 11:26:55 EDT 2005
I've been able to get around this by creating a _notifyOfCopyTo on the
folder type that does the recursion. There's a delicate dance in some
of my code that does some work in _notifyOfCopyTo and other work in
_getCopy. This could be improved I bet, but touching the code means
that you surely own it forever. ;-)
On Mon, 2005-08-08 at 11:05 -0400, Geoff Davis wrote:
> 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
>
>
>
> _______________________________________________
> Zope-Dev maillist - Zope-Dev at zope.org
> http://mail.zope.org/mailman/listinfo/zope-dev
> ** No cross posts or HTML encoding! **
> (Related lists -
> http://mail.zope.org/mailman/listinfo/zope-announce
> http://mail.zope.org/mailman/listinfo/zope )
>
More information about the Zope-Dev
mailing list