-------- Original Message -------- Subject: Re: [Zope] Using ObjectManager class Date: Fri, 12 Mar 2004 09:02:36 +0100 From: Bernd Dorn <zope-mailinglist@mopa.at> To: Serg <sutni@yandex.ru> References: <007501c407fc$78cb9f20$1cc0c0c0@dunrose.com> Serg wrote:
<file min_all.py> .... class min_all(SimpleItem.SimpleItem,ObjectManager): ... manage_options=(ObjectManager.manage_options + ({'label':'Edit Minimal', 'action':'manage_editMin_allForm'}, )) ...... def addFoo(self,id,dn): "add Foo object to min_all object" O=Foo(id,dn) self._setObject(id, O) self._p_changed=1
def delFoo(self,id): "del Foo object from min_all object" O=Foo(id,dn) self._delObject(id) self._p_changed=1
Function delFoo and addFoo working normally. For example, I can't add second Foo object with existing id, and I can't del Foo object with not existing id. But I can't see objects on ObjectManager.manage_options tab! I see only message: "There are currently no items in min_all1". I think, that problem is in _getOb function of ObjectManager class.... How can I change this function?
And where can I read information about using ObjectManager class?
Regards, Serg.
------------------------------------------------------------------------
_______________________________________________ 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 )
does Foo inherit from SimpleItem or something equivalent? - this is needed as far as i now take a look at the source in lib/python/OFS/ObjectManager.py and SimpleItem.py , bernd