[Zope] Different external method and acquisition syntax question.
jelle
jellej@pacbell.net
Tue, 07 Aug 2001 23:25:50 -0700 (PDT)
Hello Florent and Dieter,
Thanks for the reference to showaq and the test case.
The test case provided by Florent works well on 2.4.0. also which forced
me to refine my problem.
Only python scripts and external methods where used instead of zsql object
to simplify the latest test.
The following fails when I pass a parameter to the external method with
the message
Error Type: AttributeError
Error Value: util
File Zope-2.4.0/Extensions/ex_test.py, line 2, in ex_test
The invocation URL is http://localhost:8080/test/dev/alpha/py_alpha
The sequence should be py_alpha -> py_beta -> ex_test -> py_delta.
/test/util/ex_test
#external method calling a python script
def ex_test(self,param=''):
return ' ex_test ' + self.util.py_delta()
/test/util/py_delta
#python script
return ' delta '
/test/dev/alpha/py_alpha
#python script calling a python script
return ' py_alpha ' + context.beta.py_beta()
/test/dev/master/beta/py_beta
#python script calling an external method
return ' py_beta ' + context.util.ex_test('boing')
However changing the contents of py_beta to
return ' py_beta ' + context.util.ex_test()
succeeds returning "alpha beta ex_test gamma" as expected. Note the
absence of a parameter passed to external method ex_test from py_beta.
Is there something I'm missing?
Thanks,
Jelle