Send command question

Dar Scott dsc at
Fri Jul 19 01:20:01 EDT 2002

On Thursday, July 18, 2002, at 04:42 PM, David Beck wrote:

> Is it true that handlers invoked using the Send command are not 
> executed
> immediately? That is to say, if I have a script:
> cmd1
> Send "myMessage" to fld "Whatever" of cd 2
> cmd2
> cmd3
> ...
> That cmd2 and cmd3 might be executed before "myMessage" starts 
> executing or
> in parallel with myMessage? I haven't been able to confirm this 
> myself but I
> am running into issues which suggest to me that this might be the case.

This script...

on testA
   put "A " after field "Report"
end testA

on testB
   put "B " after field "Report"
end testB

on testC
   put "C " after field "Report"
end testC

on mouseUp
   put "one " after field "Report"
   send "testA" to me
   put "two " after field "Report"
   call "testB" of me
   put "three " after field "Report"
   send "testC " to me in 0 seconds
   put "four " after field "Report"
end mouseUp

...puts "one A two B three four C " into field "Report" on my OS 
X.  In this simple case, a send (without the time) seems to work.

You might have more than one field named "Whatever".  You might 
have no such handler field "Whatever", but one in the path that is 

You might want to see if a "call" will work better.

Dar Scott

More information about the Use-livecode mailing list