[Zope] Create object inside newly created container?
Tino Wildenhain
tino@wildenhain.de
Thu, 10 May 2001 19:23:02 +0200
Hi Sean,
--On Donnerstag, 10. Mai 2001 10:03 -0700 sean.upton@uniontrib.com wrote:
> Inside a python product, I have a class that subclasses OFS:Folder, and
> upon TTW instatiation of this object, I want to have a ZCatalog instance
> called 'Catalog' created within this new folder. Is the appropriate
> place to put code to do this within the class __init__() or within the
> module's manage_add...() method? What would one use to obtain the
> namespace of a newly created object after it is set in the ODB via
> _setObject()?
>
> I assume that after calling _setObject() in manage_add...(), that one
> could traverse into the namespace of that object, and call
> manage_addProduct['ZCatalog'].manage_addZCatalog()...
Most of the zope code uses _getObject() directly after _setObject() to get
the newly added object.
Regards
Tino