Finally found one.

Mark Wieder mwieder at ahsoftware.net
Tue Oct 2 00:08:42 CDT 2012


Craig-

Monday, October 1, 2012, 7:25:49 PM, you wrote:

[bunch of stuff deleted]

> Try it. If you press the "start" button, you get random numbers
> in msg for eight seconds. If you press the "stop" not while this is
> going on, nothing happens.

You need to give the engine some room to breathe. Insert the line

wait 0 milliseconds with messages

at the start of your showRandoms function. The "with messages" part
will allow the engine a chance to look around and see if any events
have occurred (as for instance someone pressing the Stop button).
Otherwise you've coded up a loop that's so tight the engine will never
see the mouseUp (or any other) message.

When you're running this in the debugger there are a lot of engine
events happening - your actual code is only a small fraction of that,
and the engine is paying attention to everything in the environment.
That's why your mouseclicks get registered.

-- 
-Mark Wieder
 mwieder at ahsoftware.net




More information about the use-livecode mailing list