Trapping the escape key inside a loop
davidocoker at gmail.com
Tue Apr 6 20:14:49 EDT 2010
Scratching my head in wonderment again, trying to figure out why I
can't trap the escape key.
Here is a sample script that I've been playing with outside of my real
app that is pretty close to the real thing:
put 0 into gStop
repeat with i = 1 to 10000
if gStop = 1 then exit repeat
do some useful work here
I've tried the following handler at the button level, the card level
and the stack level, yet can't for the life of me, get it to break the
repeat loop using a simple flag method.
put 1 into gStop
I can easily trap the escape key anywhere outside of the loop with no
problems, but I'm obviously missing something while in the loop.
Any help out there?
More information about the Use-livecode