On Fri, Jul 02, 2004 at 07:40:31PM +0200, Garito wrote: > Hi all! > > I have a class like these: > > class Test(CatalogAware, , OrderedFolder): > def manage_beforeDelete(self, item, container): > CatalogAware.manage_beforeDelete(item, container) > OrderedFolder.manage_beforeDelete(item, container) > > I only put the relevant code > > If I delete de hook to manage_beforeDelete the class works fine (the objects > disappear from the catalog) but if I put the function the catalog don't > delete the objects > > any idea?
In Python, anytime you call "unbound" methods (i.e. by referencing a class rather than an instance), you need to pass an instance - in this case, self - explicitly. For example: def manage_beforeDelete(self, item, container): CatalogAware.manage_beforeDelete(self, item, container) OrderedFolder.manage_beforeDelete(self, item, container) But if your actual code looks like your example, you should have gotten errors due to missing arguments. -- Paul Winkler http://www.slinkp.com _______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )