Send command question

Jan Schenkel janschenkel at yahoo.com
Fri Jul 19 00:14:01 EDT 2002


--- David Beck <davethebrv at mac.com> wrote:
> Is it true that handlers invoked using the Send
> command are not executed
> immediately? 
> [snip]
> Are there conditions in which
> the Send command behaves
> differently than calling a handler in the usual
> fashion (excluding the send
> in #ofticks option)? Thanks in advance,
> 
> Dave
> 

Hi Dave,

Your assessment is correct: a 'send' will not execute
until the end of the current thread of code.

The idea is: 'Send' actually puts it on a to-do list,
which it will go through once the normal exectuion of
the handlers has ended.
Then it will see if there are any 'pendingMessages',
and check if it is time they are executed or not.

So in your example, cmd2 and cmd3 will be executed
_before_ the sent message is handled.

Hope this cleared things up a bit,

Jan Schenkel.

"As we grow older, we grow both wiser and more foolish
at the same time."  (De Rochefoucald)

__________________________________________________
Do You Yahoo!?
Yahoo! Autos - Get free new car price quotes
http://autos.yahoo.com



More information about the Use-livecode mailing list