Paulo Gaspar wrote:
>
> Does someone have a clue on what the problem is?
Actually, after a little investigation, I am starting to suspect exactly
what the problem is...
> Every time a use VMs, Velocity stops making sense.
> Sorry, but I get so many weird things that I can
> only describe it this way.
>
> Example:
>
> Having the macro:
>
> #macro (mymacro $cn $cv)
> #if($cv)
> <tr><td>$cn mm</td><td>$cv</td></tr>
> #end
> #end
>
> and
>
> #mymacro($somevar $emptyVar)
>
> something gets written all the time, even if the
> $emptyVar is really "empty".
I tried this. Here is my test template :
#macro( foo $a $b )
#if($b)
yes:$a
#else
no
#end
#end
#foo( "first" $lala )
#set($lala = "foo")
#foo( "second" $lala )
and here is the output
no
yes:second
Now, this contradicts your findings?
geir
--
Geir Magnusson Jr. [EMAIL PROTECTED]
System and Software Consulting
Developing for the web? See http://jakarta.apache.org/velocity/
You have a genius for suggesting things I've come a cropper with!