At 04:22 PM 6/11/00 -0400, Kevin Dangoor wrote:
>What will be the right way to subclass ObjectManager? CatalogAware won't
>really be necessary, because you can use the events stuff to catalog
>things... but, I make a lot of things ObjectManagers...
All that's required is that manage_afterAdd call self._objectAdding() and
manage_beforeDelete call self._objectDeleting(). See DataSkins.py for an
example in the DataSkin base class.
As for what the right way to get this to happen in ZClasses (apart from
creating a Python base), I haven't the foggiest. So, in the code I'm
working on now, I've revised DataSkin's implementation of these methods to
call ObjectManager's implementation, as long as the skin's aq_base has an
objectValues method. This ought to work safely with any kind of object.
I'll have to try it out though, to be sure. Perhaps you'll see it in
snapshot 2 (if there is one before the final release).
In any case, my goal is that all you ever need to do to make a DataSkin
ZClass should be to put DataSkin first in the base class list. About the
only real limitation would be that you mustn't overwrite the default
__init__ method with something that isn't specifically written for
Zope-Dev maillist - [EMAIL PROTECTED]
** No cross posts or HTML encoding! **
(Related lists -