velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Leos Literak <liter...@centrum.cz>
Subject key not removed from context
Date Sat, 10 Aug 2002 19:30:07 GMT
Hi,

I just decided to finally implement
the feature, that null value assignment
unsets variable on left side.
Well, it seemed straightforward, but
it doesn't work :-)

So, I realized, that I have to modify
ASTSetDirective's method render().

My simplific implementation is:

if ( value  == null)
{
  System.out.println("null assignment 
$"+left.getRootString()+"="+right.literal());
  String lhs = left.getRootString();
  Object o = context.remove(lhs);
  return false;
}
	
I could find the variable in context
(context.innercontext.context.context.table),
but when I debugged remove, I realized
it goes in context.vmproxyhash, where
table contains only one different variable.
So the result is, that Object o = null
and variable wasn't deleted from context.

Is this behaviour bug or feature?
Thanks for fast response and in this
case please cc me, because www.mail-archive.com
has several day delay :-(.

Btw is not there news bridge with this conference?
I would be hapy to watch it each day without
filling my mailbox.

Sincerelly

	Leos

-- 
Leos Literak
http://AbcLinuxu.cz - tady je tucnakum hej!



--
To unsubscribe, e-mail:   <mailto:velocity-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:velocity-user-help@jakarta.apache.org>


Mime
View raw message