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

Re: [Zope] Acquiring object from Products instances


Hello,

I think this is what you need:
http://www.zopelabs.com/cookbook/1001368850


m

Luca Manini wrote:

Hi, 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.
Image I have something like this:

+ f (Folder)
 + o (object to acquire)
 + i (ageForm istance)
 + s (script that creates i and calls i.m)

so the script s is like this:

i = f.manageAddForlder .....
i.m ()

the ageForm method is like this:

def m(self):
   o.doSomething()

the ageForm class inherits from SimpleItem.SimpleItem and from a
simple Python base class.

	Any hint?
	TIA, Luca





_______________________________________________
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.