Sender of send in time

Richard Gaskin ambassador at
Thu Jul 12 14:57:11 EDT 2018

Bob Sneidar wrote:

 > I have a sticky problem here, or I should say a slippery one.
 > Something in my scripts is sending a selectionChanged message in time
 > to a specific datagrid when it shouldn't. How do I determine the
 > sender of a send in time message? The pendingMessages and
 > executionContexts are cleared by that time.

I don't believe the LC engine maintains awareness of the sender of 
timers.  If it does, I don't know of a way that's exposed to scripters.

Where timers are used sparingly, it may be practical as a workaround to 
search for those instances and add a param to sent messages to track that.

Alternatively, when using " <time>" then "the result" will 
contain the ID of the newly created timer.  You could use that as the 
key in an array which stores any info you need about the caller, being 
mindful of course to clear entries as they fire so the array doesn't 
grow beyond reasonable bounds.

May also be useful to submit an enhancement request for that info, 
though I have no suggestions as to how this should be handled, except 
perhaps by adding a new item to the pendingMessages entry which would 
contain the long id of the sender, if that's sufficient.

  Richard Gaskin
  Fourth World Systems
  Software Design and Development for the Desktop, Mobile, and the Web
  Ambassador at      

More information about the use-livecode mailing list