[Zope] What to do when an External Method returns adictionary

Morten W. Petersen mpeters@online.no
Wed, 29 Sep 1999 01:22:19 +0200


chas wrote:
> 
> ><!--#var "core.newcurrenttime(nowtime())"--> returns a list,
> >however, I can't seem to fetch the variables it returns.. :\
> >
> >Any ideas, a pointer to the relevant python code, etc.?
> 
> why not assign it to a variable in REQUEST.
> 
> <dtml-call "REQUEST.set(tempvar, core.newcurrenttime(nowtime()))">
> 
> then you can refer to it repeated without having to call the
> external method again
> 
> ~~~~~~~~~~~~~~~~~~~~~~~~
> 
> or loop over it with dtml-in if you wish to use the results immediately.
> 
> <dtml in "core.newcurrenttime(nowtime())">
>         ...
> </dtml-in>
> 
> ~~~~~~~~~~~~~~~~~~~~~~~~

The method returns a dictionary (see subject), but I called it a list.
Good idea with the temp var.

Thankyouverymuch.