Thanks for responding, Michael...

 

Another approach I ended up playing with yesterday was

 

<foreach item="String" in="1,2,3,4,5,6,7,8,9,10,etc" delim=","
property="loop">

   <call unless="${stopcondition}" target="dowork"/>

</foreach>

 

There's some useless spinning once ${stopcondition} is set but no extra
sleep or wait for it.

 

Not terribly elegant but it also works.

 

Thanks

-Mark

 

 



 
This e-mail message, and any attachments, is intended only for the use of the 
individual or entity identified in the alias address of this message and may 
contain information that is confidential, privileged and subject to legal 
restrictions and penalties regarding its unauthorized disclosure and use. Any 
unauthorized review, copying, disclosure, use or distribution is strictly 
prohibited. If you have received this e-mail message in error, please notify 
the sender immediately by reply e-mail and delete this message, and any 
attachments, from your system. Thank you. 

________________________________


From: Michael Frederick [mailto:[EMAIL PROTECTED] 
Sent: Saturday, February 03, 2007 7:42 PM
To: Mark Modrall; nant-users@lists.sourceforge.net
Subject: RE: [NAnt-users] any break from for loop?

 

We have written a small C# "script" that waits for a set of files to
appear.  It has a polling interval for checking the files, and a timeout
value for a "give-up" condition.  Its not tightly-integrated into NAnt,
but it works.


-----Original Message-----
From: [EMAIL PROTECTED] on behalf of Mark Modrall
Sent: Sat 2/3/2007 12:17 PM
To: nant-users@lists.sourceforge.net
Subject: [NAnt-users] any break from for loop?

Hi...



I've been trying to code a task to wait for something to happen and I'd
like to break out when it does.  I started looking at <foreach> but
there didn't seem to be any way (other than fail) to break out of the
loop once the event occurred.  I tried using recursion, but then found
tasks can't call themselves.  I might be able to trick it with a 2-task
step, but I thought I'd just ask before it got too kludgey...



Any more canonical way to do that in nant?



Thanks

_mark


This e-mail message, and any attachments, is intended only for the use
of the individual or entity identified in the alias address of this
message and may contain information that is confidential, privileged and
subject to legal restrictions and penalties regarding its unauthorized
disclosure and use. Any unauthorized review, copying, disclosure, use or
distribution is strictly prohibited. If you have received this e-mail
message in error, please notify the sender immediately by reply e-mail
and delete this message, and any attachments, from your system. Thank
you.
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
NAnt-users mailing list
NAnt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users

Reply via email to