Paulo Gaspar wrote:
> 
> Does someone have a clue on what the problem is?

yes.

> 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.

Ok.
 
> 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".

Can you define empty?  You mean not in the context?

> In the past I already got to see that there seems
> to exist some wrapper to the parameter variables
> that is not invisible at all (such wrapper should
> let us see trough) and messes up this kind of test.

Yes - there is a wrapper.  I remember that there was a side effect of
this, but I thought that behavior was preserved.  I will investigate.
 
> Also, sometimes code in macros seems to become
> "persistent" (I change the template but the bit of
> formatting from inside the macro remains the same.

Yes - by default, the first macro defined is permanent.  There are
plenty of options to change the behavior to suit your need.  In this
case...

 velocimacro.permissions.allow.inline.to.replace.global = true

will fix it.

> Does anyone have any pointers on this stuff?
> Any clues?
> Any advise on where I should start trying to fix this?

Well, reading the manual in the case of the macro persistance might have
given  you a clue.  I have been wanting to write something more
substantial about the VMs, so I guess this motivates me to do it.
 
> Does downloading the last version solve it all?
> (wishful thinking!)

No.  The VM code has been very stable - the only change recently had to
do with 'local scope' namespaces, totally unrelated to this.


> 
> Sorry about the sarcastic mood, but I already spent
> too much time with this. I am willing to turn by
> agressivity into solving this, but pleaaaase give
> me a clue. (I don't even know if I have to start
> learning JavaCC or if I can still void that.)

Why didn't  you just ask?
 
> Thanks and have fun,
> Paulo Gaspar

-- 
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!

Reply via email to