12 Sep
2002
12 Sep
'02
4:20 a.m.
* In the __init__ method, I have : self.index_object()
this will not work because inside __init__ the object has no "context", it has not been seated in a container and cannot "find" things (including your catalog) through acquisition yet. add the manage_afterAdd and manage_beforeDelete hooks to you class and do indexing/unindexing in those:: def manage_afterAdd(self, item, container): """ what to do after i have been created """ self.index_object() def manage_beforeDelete(self, item, container): """ what to do before i get deleted """ self.unindex_object() those hooks get called automatically right after instantiating the object and right before it is deleted. jens