On Wed, Jun 20, 2007 at 10:02:01AM -0400, [EMAIL PROTECTED] wrote:
> > i tryed to call it using sql_do_something = 
> > context['db/sql_do_something'] hoping that maybe using aquisition 
> > ... i can get the script ... but i get the message that he can't 
> > find the object. 
> Maybe context['db']['sql_do_something'].  I don't remember. 

Close but no cigar.  Dictionary-style item access does NOT use

   foo['bar']['baz'] works iff bar is in foo and baz is in bar.

Object-style attribute access DOES use acquisition:

   foo.bar.baz works if bar is in (or can be acquired by) foo, and baz
   is in (or can be acquired by) bar.

Finally, restrictedTraverse() is your friend:

   foo.restrictedTraverse('bar/baz') works like foo.bar.baz



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

Reply via email to