[Zope] Nested ZSQL methods

Tony McDonald tony.mcdonald@ncl.ac.uk
Thu, 6 Apr 2000 11:08:31 +0100


Hi,
I *thought* I was getting Zenned up. Maybe not :(

I have two ZSQL methods in the same folder called 'LTSN', 'details' 
and 'author', where output from 'details' is used to query 'author' 
for information, ie

<dtml-in "details(new_id=tst_id)">
<dtml-in "author(code=Contact_Shortcode)">
<dtml-var Firstname> <dtml-var Surname><br>
</dtml-in>
</dtml-in>

This gives a TypeError.

Traceback (innermost last):
   File /home/MEDFAC_SERVER/lib/python/ZPublisher/Publish.py, line 
165, in publish
   File /home/MEDFAC_SERVER/lib/python/ZPublisher/mapply.py, line 160, in mapply
     (Object: more)
   File /home/MEDFAC_SERVER/lib/python/ZPublisher/Publish.py, line 
102, in call_object
     (Object: more)
   File /home/MEDFAC_SERVER/lib/python/OFS/DTMLDocument.py, line 166, 
in __call__
     (Object: more)
   File /home/MEDFAC_SERVER/lib/python/DocumentTemplate/DT_String.py, 
line 502, in __call__
     (Object: more)
   File /home/MEDFAC_SERVER/lib/python/DocumentTemplate/DT_In.py, line 
691, in renderwob
     (Object: details(new_id=tst_id))
   File /home/MEDFAC_SERVER/lib/python/DocumentTemplate/DT_In.py, line 
633, in renderwob
     (Object: author(code=Contact_Shortcode))
   File /home/MEDFAC_SERVER/lib/python/DocumentTemplate/DT_Util.py, 
line 335, in eval
     (Object: author(code=Contact_Shortcode))
     (Info: Contact_Shortcode)
   File <string>, line 0, in ?
TypeError: call of non-function (type string)

Thing is, that this code works fine.

<dtml-in "details(new_id=tst_id)">
<dtml-in "LTSN.author(code=Contact_Shortcode)">
<dtml-var Firstname> <dtml-var Surname><br>
</dtml-in>
</dtml-in>

Can anyone enlighten me here? This is baffling...

cheers
tone.
------
Dr Tony McDonald,  FMCC, Networked Learning Environments Project 
http://nle.ncl.ac.uk/
The Medical School, Newcastle University Tel: +44 191 222 5888
Fingerprint: 3450 876D FA41 B926 D3DD  F8C3 F2D0 C3B9 8B38 18A2