The Most Stupid Question Ever?

Mark Wieder ahsoftware at sonic.net
Sun Nov 8 23:02:37 EST 2020


On 11/8/20 6:57 PM, Roger Guay via use-livecode wrote:
> Please tell me why this doesn’t work:
> 
> on mouseUp
> 
> 	put "start"
> 
> 	wait for 5 seconds
> 
> 	put "stop"
> 
> end mouseUp
> 
> “start” never appears in the message box and after 5 seconds, “stop” appears

The wait command is blocking anything else from happening (like updating 
the messagebox). After five seconds the messagebox gets "start" followed 
immediately by "stop".

To allow events to happen while waiting try

on mouseUp
    put "start"
    wait for 5 seconds with messages
    put "stop"
end mouseUp

-- 
  Mark Wieder
  ahsoftware at gmail.com




More information about the use-livecode mailing list