On 7/30/22 19:02, Paul Dupuis via use-livecode wrote:

So Mark,

Your understanding is that 'wait 0' (WITHOUT with messages) would allow OS events like a screen redraw, USB drive insertion/removal, etc. but NOT livecode engine events in the queue like mouseDown, mouseUp, resumeStack, etc,

OR

That wait 0 (again without with messages) would include in addition to OS events, LC built-in events like mouseDown, resumeStack, etc., but not custom messages (or LC standard messages) sent to the queue via sent in time?

I don't think "wait 0" by itself does anything useful. Make a stack with two buttons. Running the script in the first button will prevent mouseUp events in button 2 from being processed.

button 1 script:
on mouseUp
  repeat forever
    wait 0
  end repeat
end mouseUp

button 2 script:
on mouseUp
  put the name of me & cr after msg
end mouseUp

Now hit command-period to exit to the debugger, change the script of button 1 to

on mouseUp
  repeat forever
    wait 0 with messages
  end repeat
end mouseUp

and you can click button 2 and see new text in the message box.

--
 Mark Wieder
 ahsoftw...@gmail.com

_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to