If you need to break the cycle before it's complete you can do the
following:
|----------
| |
| ****** ********
| * OK *-----* Stop *
| ****** ********
|
************
* On cycle *------ Loop code
************
If the OK button is pressed then the loop stops after the next object
in the loop executes. If your cycle is long then you may not want to
wait until it completes. Since VEE multiplexes between both threads
this works great for breaking out of loops or changing things while a
loop is running.
Mark
______________________________ Reply Separator _________________________________
Subject: VRf--User asynchronously stops a thread?
Author: boris@gore.afep.cornell.edu at corp
Date: 03/04/96 18:53
OK, I'm slow, and this must be an obvious one. How does one implement a
"stop" button so that one can put a user initiated keyboard or mouse break into
a thread started with "On Cycle"?
following:
|----------
| |
| ****** ********
| * OK *-----* Stop *
| ****** ********
|
************
* On cycle *------ Loop code
************
If the OK button is pressed then the loop stops after the next object
in the loop executes. If your cycle is long then you may not want to
wait until it completes. Since VEE multiplexes between both threads
this works great for breaking out of loops or changing things while a
loop is running.
Mark
______________________________ Reply Separator _________________________________
Subject: VRf--User asynchronously stops a thread?
Author: boris@gore.afep.cornell.edu at corp
Date: 03/04/96 18:53
OK, I'm slow, and this must be an obvious one. How does one implement a
"stop" button so that one can put a user initiated keyboard or mouse break into
a thread started with "On Cycle"?
----- Button ---- If/Then/Else ----- Stop
Set the If/Then block to "a==1" and connect the "then" o/p to the Stop
object. Leave the "Else" o/p unconnected. Your "On Cycle" loop will
continue until the Button is pressed. Under the Button's properties menu,
select Initialize at Activate to reset the button.
Hope this helps
Andrew Rhind
MicroUnity
_______________________________________________________________________________
From: boris@gore.afep.cornell.edu on Wed, Apr 3, 1996 4:20 PM
Subject: VRf--User asynchronously stops a thread?
To: hpvxd_xc@hpislsup.lvld.hp.com
OK, I'm slow, and this must be an obvious one. How does one implement a
"stop" button so that one can put a user initiated keyboard or mouse break
into
a thread started with "On Cycle"?