Hello! Can anybody tell me, what the 'dp=1' attribute in the _delObject methods of the ObjectManager (OFS/ObjectManager.py) and ZClassMethodsSheet (ZClasses/Method.py) Class are for? I haven't found any method call, where dp is set and the methods themselves don't use it aswell. I would like to use it as a switch for (not) calling the manage_beforeDelete method, when the _delObject method is called by CopySupport.manage_renameObject and CopySupport.manage_pasteObject. In these cases, manage_beforeDelete would not be called. To me that seems to be correct, because during a cut-paste and a rename operation the Objects are not really deleted, they are just temporarily taken out of the object-tree and then inserted again. Are there any problems with that? Or is 'dp' used for another purpose in an older or a newer version of Zope (I use Zope 2.1.6)? -OFS/ObjectManager.py-line 277--------- def _delObject(self, id, dp=1): object=self._getOb(id) if dp: object.manage_beforeDelete(object, self) self._objects=tuple(filter(lambda i,n=id: i['id']!=n, self._objects)) self._delOb(id) --------------------------------------- -OFS/CopySupport.py-line 225 and 259--- ob.aq_parent._delObject(id, 0) --------------------------------------- Thanx, Gregor!
participants (1)
-
Heine, Gregor