Finally found one.

Richard Gaskin ambassador at fourthworld.com
Wed Oct 3 10:39:37 EDT 2012


Mark Wieder wrote:
> Scott-
>
> Yes to all the above with the exception that I'm not sure
>
> send xyz to me in 0 milliseconds
>
> gives any time for other messages to get through.

It seems to, at least with this test:

1 card, two buttons.

Script of btn "A":

on mouseUp
    global g
    put true into g
end mouseUp


Script of btn "B":

on mouseUp
    global g
    put empty into i
    repeat forever
       add 1 to i
       if g is not empty then exit to top
       wait 0 with messages
       put i
    end repeat
end mouseUp

Click on btn "B", enjoy the number incrementing in the Message Box for a 
while, then click on btn "A" - btn "B"'s script stops.

I believe any use of "with messages" will queue messages to be handled 
at first idle or the earliest timer expiration, whichever occurs first.

So with a timer set to a delay of zero, this still applies just with the 
shortest possible delay.

--
  Richard Gaskin
  Fourth World
  LiveCode training and consulting: http://www.fourthworld.com
  Webzine for LiveCode developers: http://www.LiveCodeJournal.com
  Follow me on Twitter:  http://twitter.com/FourthWorldSys




More information about the use-livecode mailing list