I believe you're looking for: def manage_delObjects(self, ids=[], REQUEST=None): """Delete a subordinate object The objects specified in 'ids' get deleted. """ This is from lib/python/OFS/ObjectManager.py Kevin -----Original Message----- From: Mike Mikkelsen <mikk@microbsys.com> To: zope@zope.org <zope@zope.org> Date: Friday, September 17, 1999 5:01 PM Subject: [Zope] delete zclass instance
Hello,
When creating a zclass, the dtmlMethod YourClass_add(...) is automatically added. The actual line in the code to do the work is: (My class name is ItemClass) [snip]-#with "ItemClass.createInObjectManager(REQUEST['id'], REQUEST)"[snip].
Is there such a method as .deleteInObjectManager(.....), and if so, what are it's parameters?
I'm experimenting with an ecommerce idea using dynamically created instances of zclasses, but I'm stumped on how to get rid of them via dtml.
Thanx!!
-- ========================================================================== Mike Mikkelsen mikk@microbsys.com Micro Business Systems http://www.microbsys.com Fresno Linux Users Group http://linux.fresno.ca.us
Linux: The OS people choose without $200,000,000 of persuasion
_______________________________________________ Zope maillist - Zope@zope.org http://www.zope.org/mailman/listinfo/zope
(To receive general Zope announcements, see: http://www.zope.org/mailman/listinfo/zope-announce
For developer-specific issues, zope-dev@zope.org - http://www.zope.org/mailman/listinfo/zope-dev )
Thanks for the reply. Ok. So I copied my ItemClass_add(constructor) to ItemClass_delete and then changed the following line: <!--#with "ItemClass.createInObjectManager(REQUEST['id'], REQUEST)"--> to: <!--#with "ItemClass.manage_delObjects(self, REQUEST['id'], REQUEST)"--> but I'm getting a NameError with 'self'. What should that first parameter be? Also: does this appear to be a Zope Newbie question, or a Python Newbie question? I'm trying to figure out what will smooth this learning curve. Thanx! Kevin Dangoor wrote:
I believe you're looking for:
def manage_delObjects(self, ids=[], REQUEST=None): """Delete a subordinate object
The objects specified in 'ids' get deleted. """
This is from lib/python/OFS/ObjectManager.py
Kevin
-----Original Message----- From: Mike Mikkelsen <mikk@microbsys.com> To: zope@zope.org <zope@zope.org> Date: Friday, September 17, 1999 5:01 PM Subject: [Zope] delete zclass instance
Hello,
When creating a zclass, the dtmlMethod YourClass_add(...) is automatically added. The actual line in the code to do the work is: (My class name is ItemClass) [snip]-#with "ItemClass.createInObjectManager(REQUEST['id'], REQUEST)"[snip].
Is there such a method as .deleteInObjectManager(.....), and if so, what are it's parameters?
I'm experimenting with an ecommerce idea using dynamically created instances of zclasses, but I'm stumped on how to get rid of them via dtml.
Thanx!!
-- ==========================================================================
-- ========================================================================== Mike Mikkelsen mikk@microbsys.com Micro Business Systems http://www.microbsys.com Fresno Linux Users Group http://linux.fresno.ca.us Linux: The OS people choose without $200,000,000 of persuasion
participants (2)
-
Kevin Dangoor -
Mike Mikkelsen