[Zope] - Can't make the DTML example work ;-(

Jim Washington jwashin@vt.edu
Sat, 19 Dec 1998 10:28:24 -0500


http://www.zope.org/Documentation/Reference/DTML

I think the assignment example is on the above referenced DTML Scripting page as
an example of what you might do if you could do it.

It turns out that you cannot do assignments (=), but if you want to do what the
example purports to do, a bit of spelunking in the object
reference will reveal a Folder method called manage_changeProperties.

<!--#call "manage_changeProperties(counter=counter+1)"-->
will increment the counter property. 

-- Jim Washington

>Luc> <!--#call expr="counter=counter+1"-->
>    Luc> Counter: <!--#var counter-->
>
>    Luc> When I try to view the page, I get the following error:
>	 ...
>    Luc>   File /usr/local/Zope/lib/python/DocumentTemplate/VSEval.py, line 170, in __init__
>    Luc>     (Object: counter=counter+1)
>    Luc>   File "<string>", line 1
>    Luc>      counter=counter+1
>    Luc>             ^
>    Luc>  SyntaxError: invalid syntax
>    Luc> ===================
>
>I'm not sure what example you're referring to, or precisely what the
>solution is, but it looks to me like you're putting a statement
>(counter=counter+1) where an expression (e.g., counter+1) is required.
>
>Skip Montanaro	   | Mojam: "Uniting the World of Music" http://www.mojam.com/
>skip@calendar.com  | Musi-Cal: http://concerts.calendar.com/
>518-372-5583