More send in time

curry curry at pair.com
Mon Jun 30 23:12:00 EDT 2003


While learning more about "send in" scripts, here's a general 
suggestion, not for every situation where "send in" is used, but 
something that can be useful:

Unlike the good old "idle" message, you have to make sure that your 
custom handler doesn't fire and cause an error when the user has 
moved to a new card and the script tries to do something or refer to 
something that isn't there any more.

You can handle these with variables if needed, such as an action that 
has a definite beginning and end, but for more general cases where it 
needs to do something until leaving the card, I find it handy to 
reference the name of the card:

on doThis
   if the name of this card is "thiscard" then
     ...
     send doThis to me in .5 sec
   end if
end doThis

Curry




More information about the use-livecode mailing list