[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Zope] Acquiring object from Products instances


Luca Manini writes:
 > I've a product that defines a classe ageForm. 
 > I've a PythonScript that adds an ageForm instance to a folder. 
 > After adding the instance it calls a method on it. 
 > This methods tries to access an objects using acquisition. 
 > ...
Apparently, you do not tell us what your problem is...

I expect, the problems cause is that constructors in Zope
usually do not return the constructed object (but either "None"
or the id of the constructed object).

The standard idiom is:

    om.manage_addProduct[<product_name>].<constructor>(id,....)
    obj= getattr(om,id)


Dieter


_______________________________________________
Zope maillist  -  Zope@xxxxxxxx
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )



This mailing list archive is a service of Copilotco.