For me, that behavior sounds perfect.

However, I must confess that the reverse would also be ok.

The way I use it, when a Velocity reference/var gets rendered with the 
dollar $ign and all it is just because I am doing something wrong.
=:o)


BTW, please tell me a couple of files involved in this issue. I would
like to have a starting point to better understand this bit of Velocity.


Thanks for your attention and have fun,
Paulo

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
> Behalf Of Geir Magnusson Jr.
>
> ...
>
> > An example :
> > 
> > #macro( foo $a )
> >  ->$a<-#if($a)yes#end
> > #end
> > 
> > When called with a real value :
> > 
> > #set($lala = "hello")
> > #foo($lala)
> > 
> > output
> > 
> > ->hello<-yes
> > 
> > and when called with something not in the context
> > 
> > #foo($notincontext)
> > 
> > output
> > 
> > ->$a<-
> > 
> > That would be the result of the change.
> 
> As a follow up - I think some may initially object to this behavior as
> it's different than a regular reference in that you get the VM arg
> reference rendered ($a) rather than the passed-in reference rendered
> when it's null ($notincontext).
> 
> I think this is ok - because unlike a regular reference in a template,
> where we render 'as is' because it is not a reference if not backed by
> data in the context (ex.  $ave at our $ale on $aturday! ), in a VM, it
> is clearly intended to be a reference because it's the formally declared
> arg to the VM, so I think there is no harm in rendering the arg
> reference token ($a, above) vs the arg reference.
> 
> Was thinking about it...
> 
> geir

Reply via email to