what actually happens when sending a message out of a repeat loop?
ambassador at fourthworld.com
Thu Jun 19 09:41:47 CDT 2008
Tiemo Hollmann wrote:
> I have a repeat loop and send a message to another handler from within the
> repeat loop with parameters, which change every loop.
> If using a function call instead of the message, the main handler would wait
> until the function returns back, but when sending a message, the loop is
> running on. So what happens now, if the sub handler takes "much longer" as
> the main handler and the loop turns hundred of times. Will all the send
> messages to the sub handler with the changed parameters kept in the
> messagequeue safely and being processed, even after the main handler has
> finished already? Are there any limitations in message numbers or size of
> this messagequeue?
When you send a message like this:
send "DoSomething" to btn "SomeScripts"
...it executes DoSomething and only returns to the calling handler when
But if you use this form:
send "DoSomething" to btn "SomeScripts" in 10 millisecs
...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.
Managing Editor, revJournal
Rev tips, tutorials and more: http://www.revJournal.com
More information about the use-livecode