The Wait command

John Craig john at splash21.com
Fri Jun 24 17:07:25 EDT 2011


This works for what I understand the original scenario was.  If you 
click button 1, it waits either until the 10 seconds has elapsed or 
until button 2 is pressed.

:)


Add 2 buttons to a new stack;

1st button script;
on mouseUp
    set the uFlag of this card to false
    put the millisecs + 10000 into tTime
    repeat until the millisecs > tTime or the uFlag of this card = true
       wait for 100 millisecs with messages
    end repeat
    answer "OK"
end mouseUp


2nd button script;
on mouseUp
    set the uFlag of this card to true
end mouseUp



On 24/06/2011 21:52, Bob Sneidar wrote:
> See this is the perfect example of why some kind of multiple processing thing is needed. If you say
>
> wait until<condition>  then no other processing can take place. Even in the repeat loop it doesn't help. If the condition is triggered by some kind of execution the even will never happen because you are waiting. I know we hammered this to death in another thread, but this would be I think one of the main reasons why it would be beneficial.




More information about the use-livecode mailing list