I've a class with a property myparent This property needs to be set after a new instance is added or when the instance is moved.
Thanks to people from the list, I know I've to make an external method and add the external method manage_afterAdd to the methods of the class.
This is how the method looks:
def manage_afterAdd(self,item,container): item.myparent=container.id return
This is a ZClass, right?
It should be:
item.propertysheets.YourPropsheet.manage_changeProperties({'myparent' : container.id})
Kevin
Yes, it's a ZClass with in it's method's tab an external method called : 'manage_afterAdd' The external method itself is python code (see source above) The intention of this method is that it sets the 'myparent' property to a value (dependend on its parent) when an instance of the ZClass is created or when the instance is moved. The problem is that nothing happens! 'myparent' property keeps empty. I also don't get an error value... :-( urgh, really frustrating... I don't know what I'm doing wrong and I don't know where to look for the problem :-((( Tom.