Send command question

peter.fink at tiscali.ch peter.fink at tiscali.ch
Fri Jul 19 08:59:01 EDT 2002


>-- Original-Nachricht --
>From: Jan Schenkel <janschenkel at yahoo.com>
>Subject: Re: Send command question
>To: use-revolution at lists.runrev.com
>Reply-To: use-revolution at lists.runrev.com
>Date: Thu, 18 Jul 2002 22:11:44 -0700 (PDT)
>
>
>--- 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.
>


Thanks for pointing to this. I consider it a bug, a deviation from HC and
a difficult feature. A send without time parameter should be executed instream.
I always used it in this way.

If not, we have to use horrible completion msg schemes.

Peter









More information about the use-livecode mailing list