You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by Nathan Bubna <na...@esha.com> on 2002/01/09 01:45:30 UTC

inline local scope VMs

I'm getting some weirdness...  try this out:

#macro( nicenull $var )#if( "$!var" == "" )--#else$var#end#end
#macro( foo $obj )#nicenull($obj)#end
#macro( bar $blah )#foo($blah)#end
#bar('hello')
#foo('world')

gives me this output:
hello#nicenull

i'm pretty sure that ain't right.  weirder to me still is that:

#macro( nicenull $var )#if( "$!var" == "" )--#else$var#end#end
#macro( foo $obj )#nicenull($obj)#end
#macro( bar $blah )#foo($blah)#end
#foo('world')

gives me this output:
world

which is right, but why this and not that, i don't know.
i'm at a loss and i'd really rather not work around it.  help?
i suppose you'd also like to know that this only happens when
velocimacro.permissions.allow.inline.local.scope = true
and that i'm using velocity-1.2-rc2.   if the version i've got is the
problem (i.e. if this works in a newer one), then chastise me for not trying
that first and send me on my way.

Thanks,
Nathan Bubna
nathan@esha.com


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>