Is there a way for an object to be notified that it has been modified?

In particular, I want to create Relation objects that relate two arbitrary
Folders.  Creating the Relation object with a ZClass is easy (even for a newbie
like me :-) ), but I need to update the relation links if the destination folder
is moved.

My thinking is that I need a parentChanged method that is invoked by a parent.
parentChanged would then recursively invoke parentChanged for each of its child
folders.  The purpose of parentChanged would be to look for any relation objects
that referenced the old location and either 1) change the reference to the new
location if the old location is no longer valid (i.e. a Cut/Paste operation), or
2) add the new location if the old location is still valid (i.e. a Copy/Paste
operation).

This sounds expensive, and I'm not sure how to kick off the process.  Does a
"Paste" create a new instance?

Thanks for the help,
Bob Barter


_______________________________________________
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )

Reply via email to