[CMF-checkins] CVS: CMF/CMFCore - CMFCatalogAware.py:1.15

Florent Guillaume fg@nuxeo.com
Sun, 2 Feb 2003 11:06:20 -0500


Update of /cvs-repository/CMF/CMFCore
In directory cvs.zope.org:/tmp/cvs-serv3899

Modified Files:
	CMFCatalogAware.py 
Log Message:
Make the mixin class CMFCatalogAware be an Extension Class, otherwise we
get into the usual problems with multiple inheritance and calling
unbound methods.

The problem occurs if, from another mixin MyMixin, you want to call
CMFCatalogAware.reindexObject(self). This raises TypeError, unbound
method reindexObject must be called with instance as first argument.

MyMixin.inheritedAttribute('reindexObject')(self) can't work of course.

(The workaround CMFCatalogAware.__dict__['reindexObject'](self) still worked tough.)


=== CMF/CMFCore/CMFCatalogAware.py 1.14 => 1.15 ===
--- CMF/CMFCore/CMFCatalogAware.py:1.14	Wed Jul 31 15:58:47 2002
+++ CMF/CMFCore/CMFCatalogAware.py	Sun Feb  2 11:06:17 2003
@@ -13,6 +13,7 @@
 
 import Globals
 from Acquisition import aq_base
+from ExtensionClass import Base
 
 from AccessControl import ClassSecurityInfo
 from CMFCorePermissions import ModifyPortalContent
@@ -22,7 +23,7 @@
 from utils import _dtmldir
 
 
-class CMFCatalogAware:
+class CMFCatalogAware(Base):
     """Mix-in for notifying portal_catalog and portal_workflow
     """