Ian Beatty wrote:

> Am I not inheriting from the proper set of base classes? Is there an easier
> way? According to the ZDG (2.4 edition, vs. my Zope 2.7),
> OFS.SimpleItem.Item (subclassed by OFS.SimpleItem.SimpleItem) is supposed to
> provide cut-and-paste functionality. So, how might I be breaking it?

The order of the parent classes matters. Ie. Some methods are defined in SimpleItem that returns None. Clipped from the source::

    # This keeps simple items from acquiring their parents
    # objectValues, etc., when used in simple tree tags.
    def objectValues(self, spec=None):
        return ()

So if SimpleItem is before ObjectManager the traversal order of the parent objects will make shure that you get the wrong methods :-( So this will *not* work:

class aSimpleItem( CatalogAware, PropertyManager, SimpleItem.SimpleItem, ObjectManager):

This order works:

    class aSimpleItem(
         CatalogAware, PropertyManager, SimpleItem):

    class anObjectManager(
         ObjectManager, aSimpleItem):

regards Max M

Zope-Dev maillist - [EMAIL PROTECTED]
** No cross posts or HTML encoding! **
(Related lists - http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )

Reply via email to