[Zope] Help in chaining calls to different method types

roymath@yahoo.com roymath@yahoo.com
Mon, 18 Feb 2002 12:21:55 -0500


Folks,

Could someone help me (relative Zope newbie) with understanding how I 
can chain method calls, with a mixed bag (i.e: py scripts, dtml methods
and dtml documents"). I find that the following calling chains fail.

  DTML_meth -> DTML_meth -> Python_Script
  DTML_doc -> DTML_meth -> Python_Script

For example:

x_py: 
  Python script
  takes 1 parameter (p1)
  URL works standalone (http://localhost:9673/Test/x_py?p1=23)

meth_1: 
  DTML method
  takes 1 parameter (p1) and passes it to x_py
  body is: <dtml-var expr="x_py(p1=p1)">
  URL works standalone (http://localhost:9673/Test/meth_1?p1=44)
 
meth_2:
  DTML method
  takes no parameters
  body is: <dtml-var expr="meth_1(p1=66)">
  URL fails (http://localhost:9673/Test/meth_2)
  I get the following message:
    Zope Error
    Zope has encountered an error while publishing this resource. 
    Error Type: NameError
    Error Value: global name 'x_py' is not defined

doc_1:
  DTML document.
  takes no parameters
  body is: <dtml-var expr="meth_1(p1='ha')">
  fails the same as meth_1.
  URL fails (http://localhost:9673/Test/doc_1)

Thanks,
Roy Mathew.