At 12:14 25/03/99 , Wade Leftwich wrote:
I'm trying to put together an External Method that needs to operate on several different objects within the ZDB (a/k/a ZODB, BoboPOS).
How do I specify an object ID and retrieve the relevant object? sorry to be obtuse, but I can't find an example anyplace. In the online docs
If I have a URL like '/manny/moe/jack', I know that from within the top-level object, I can retrieve the object 'jack' as 'manny.moe.jack'.
But if the context is jack, how do I specify the top level so I can talk about manny?
From an external method, self is the object the Externel Method is called from. If you have REQUEST passed in, you can access PARENTS[0], which is the top object. From there you can traverse down the hierarchy.
-- Martijn Pieters, Web Developer | Antraciet http://www.antraciet.nl | Tel: +31-35-6254545 Fax: +31-35-6254555 | mailto:mj@antraciet.nl http://www.antraciet.nl/~mj | PGP: http://wwwkeys.nl.pgp.net:11371/pks/lookup?op=get&search=0xA8A32149 ------------------------------------------