Thanks to all for the suggestions. For my purpose, that is, the purpose of the end-user, anything short of a button on the same form would be too "disconnected" to be really useful. However, these are all great ideas for MY use while developing the code. It is a truly wonderful thing to be able to sit at the same table with all this talent!

Thanks again,
Dave

Eric Iverson wrote:
As several members have pointed out J is single threaded (in particular the J GUI and Engine run in the same single thread). The suggestions of semaphore and mapped files are perhaps more complicated than what you required.

At the start of you run delete a known file (e.g., ~temp\interrup_run). And then test for the existance of that file at appropriate points in the running application (e.g., at the top of the main loop). If the file exists you can then do whatever you want within the application (e.g., use wd'mb ....' to put up a message asking what the user wants to do).

----- Original Message ----- From: "David Porter" <[EMAIL PROTECTED]>
To: "J programming list" <[email protected]>
Sent: Tuesday, January 15, 2008 8:52 AM
Subject: [Jprogramming] Soft-stopping of a long loop


I have a loop that processes around a hundred files. Once started, it must continue or, you must stop it using one of several ugly methods from the operating system.

I put in the break. control word that looks at a variable to enable a way to break out of the loop. I thought setting that variable with a button on the form would be a good idea, but all I get when I try this while the loop is running is the Windows "boink" . Is there a good, or any, way to set this variable while the loop is running?

Dave Porter
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm


----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to