AW: what actually happens when sending a message out of a repeat loop?

Tiemo Hollmann TB toolbook at kestner.de
Fri Jun 20 02:55:53 EDT 2008


Hi Richard,
oh that's new for me. My loop looks like this:

repeat 100
	doSomething
end repeat

on doSomething
	something
end

I didn't knew that the calling handler waits for the execution of a message
handler. I thought that it would only wait, if you use a function call, like

Repeat 100
	Get doSomething()
end repeat

Thanks for clarifying
Tiemo


> 
> When you send a message like this:
> 
>    repeat 100
>     send "DoSomething" to btn "SomeScripts"
>    end repeat
> 
> ...it executes DoSomething and only returns to the calling handler when
> DoSomething finishes.
> 
> But if you use this form:
> 
>    repeat 100
>     send "DoSomething" to btn "SomeScripts" in 10 millisecs
>    end repeat
> 
> ...then the repeat loop will continue, and DoSomething (like all timer
> messages) will only be fired once the engine hits idle.
> 
> Are you using the "send...in <time>" form?
> 
> If not, we may need to see your scripts to figure out what's going on
> there.
> 
> --
>   Richard Gaskin
>   Managing Editor, revJournal
>   _______________________________________________________
>   Rev tips, tutorials and more: http://www.revJournal.com
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution




More information about the use-livecode mailing list