At 11:50 19/10/99 , Johan Carlsson wrote:
My questions!
Is this correct to do this or can I get my self in trouble doing direct reference in this way? You will eventually ;-) Especially if your objects are not Zope objects that follow the Zope management interface.
But what could happen, if I keep record of the references, where could it break? And yes I'm going the link only objects with Management Interface. Nothing. Just because the Zope management interface uses a hierarchical structure, doesn't mean that every object cannot be referenced more then once.
Great, just what I wanted to head :-)
Here's what I whan to do:
I want to create superclasses for bidirectional links between Zope objects. The link object has a object _link thats a object referense to the other object. The other objects has a list of links to it so when it's deleted it can notify the link object. Have been looking in ObjectManager if one can use the manage_beforedelete method to handle the delete through a tree.
manage_beforeDelete would be the way to handle this, yes. Just remember, that other classes might also define this method.
Yes, I will think about it... Thanks Martijn for good advice (as always:) Johan Carlsson