J. Landman Gay
jacque at hyperactivesw.com
Sun Oct 26 21:46:27 EDT 2008
Larry Watts wrote:
> hi Mark,
> What I'm really wondering how to do is this:
> I have a button script running with a lot of repeat statements in it.
> Depending upon the input, the script will run for 5 minutes to an hour.
> I want the user to be able to interrupt the script by clicking on
> another button on the card. But as I understand it, Rev cannot do that
> because the first button has the focus until the entire script is
> finished running. Is there a way to work around this limitation of Rev?
Yes, and the workaround is the preferred method. Running a repeat loop
that long doesn't just lock up Rev, it locks up the whole CPU. Here's
the preferred solution: <http://www.hyperactivesw.com/polling.html>.
For shorter repeat loops I add a "wait 1 with messages" inside the loop,
which gives a slice of time to other apps and to other Revolution
messages. But for long repeats, you should do the above.
Jacqueline Landman Gay | jacque at hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
More information about the Use-livecode