[Zope-dev] Python base classes again (and now I'm really stuck)

Itamar Shtull-Trauring itamars@ibm.net
Mon, 22 Nov 1999 12:00:12 +0200


I want to create a Python base class that inherits from the ObjectManager
and has the "Subobjects" tab in the ZClass management screen.  Inheriting
from
OFS.ObjectManager.ObjectManager does not do this - I need to inherit from
ZClasses.ObjectManager.ObjectManager.

I still don't know how to have the Subobjects propertysheet thing work. 
I've tried the two ways I listed in my last email of doing this, but I can't
get it to work.

One way was:

class MyObjectManager(ZClasses.ObjectManager.ObjectManager):
    " .... "

class ZMyObjectManager:
    """Mix-in for Object Management
    """

    _zclass_=myObjectManager

    propertysheets=ZClasses.ObjectManager.ZObjectManagerPropertySheets()

    manage_options=(
        {'label': 'Subobjects', 'action'
:'propertysheets/subobjects/manage'},
        )

and then register ZMyObjectManager as a base class in __init__.py.  The
other way was:

class MyObjectManager(ZClasses.ObjectManager.ObjectManager):
    propertysheets=ZClasses.ObjectManager.ZObjectManagerPropertySheets()

    manage_options=(
        {'label': 'Subobjects', 'action'
:'propertysheets/subobjects/manage'},
        )

and register that as the base class.  Neither of them work.

-- 
Itamar S.T.  itamars@ibm.net