[Zope] references to zope objects

Mario Bianchi kammamuri_mb@hotmail.com
Tue, 27 Aug 2002 10:49:12 +0000


Hello list,
I need (from within python code of an object of mine, call it myObject) to 
find another existing zope object (call it targetObject) and retain a 
reference to it, in order to call its API.

As far as I have understood, objects in zope are identified by their id 
attribute, so this attribute could, I guess, be used to reference objects 
from python code of other objects. Am I wrong?
The zope online help says:

"The id is the unique name of the object within its parent object manager"

so maybe I am wrong: the id is not unique throughout the entire ZODB, only 
within the parent object manager.

Also, to get the id attribute the first time, one could call the getId() 
method of the object, right? But how can one call a method of an object 
without a reference to the object itself? Maybe via its URL?

As an alternative to using the id attribute, could I use the URL of the 
targetObject as a reference to it? In this case what's the python code to 
'dereference' the URL?

Maybe the usual way to make objects interact is via some glue DTML or  
python methods?

Any pointer to documentation telling the straight, usually followed way to 
make zope objects talk to each other?

Thanks to all. Cheers,
	Mario.

_________________________________________________________________
Join the world’s largest e-mail service with MSN Hotmail. 
http://www.hotmail.com