[Zope] Another quick question

Vid B zoops4@yahoo.com
Tue, 3 Jul 2001 16:32:23 -0700 (PDT)


It looks myVar is of string type.  You have to
typecast it to integer. 

<dtml-call "REQUEST.set('myVar','1')">
<dtml-let temp="_.int(REQUEST.myVar) + 1">
<dtml-var temp>
</dtml-let>


--- Tommy Johnson <tommy@7x.com> wrote:
> Hello All,
> 
> Tell me if I'm missing something. I can write
> 
> <dtml-let temp="1 + 1"> and then use <dtml-var temp>
> to get the value 2.
> 
> Then why can't I use a variable and increment it
> using <dtml-let> ?
> 
> <dtml-let temp="REQEUST.myVar + 1">
> 
> I get an error :
> Error Type: TypeError
> Error Value: illegal argument type for built-in
> operation
> 
> The variable has the value of 1, so it should just
> add 1 an' 1 to give me 2.
> Correct, yes/no?
> 
> Thanks in advance,
> Tommy
> 
> 
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists - 
> 
> http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )


__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/