ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Benson <gudnabr...@yahoo.com>
Subject RE: ant-contrib <for> and property immutability
Date Tue, 27 Jan 2004 16:26:03 GMT
--- "Stirling, Scott" <scott.stirling@workscape.com>
wrote:
> I know at least that in cases where the
> existence/non-existence of a property is used to
> test a condition in a loop, <variable> won't be able
> to, for example, unset (i.e., delete/remove) a
> property once it's been created.  It can only
> override the value.

I don't know if that's so.  Without testing it, and
with a quick look at the code not quickly yielding the
mechanism by which it is accomplished, the
documentation nevertheless says that ordinary
property-aware tasks can successfully set the value of
a property previously unset using the <variable> task
with an empty text value (omitting the text attribute
appears, judging from the code, to have the same
effect).  While this may or may not (probably not)
look like a nonexistent property to a target's
if/unless attributes, you should, in <for>'s
<sequential>, be able to unset your <variable> during
every iteration.

But I could be wrong...
-Matt

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free web site building tool. Try it!
http://webhosting.yahoo.com/ps/sb/

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message