running handlers

Dar Scott dsc at swcp.com
Fri Oct 13 21:48:45 EDT 2006


On Oct 13, 2006, at 7:09 PM, Jon Seymour wrote:
> Is there a way to find out the names of all handlers currently  
> running, that is, those that have started but not yet finished?

There is only one thread in Revolution so all handlers that are  
currently running are those on the call stack.  The top one is  
triggered by an event or send (and for send I guess the clock change  
is an event).  The rest are called by that directly or indirectly or  
triggered by an event or send in 'wait ... with messages'.

You can see those with the unsupported property executionContexts.   
You should be able to figure out how to parse it with a little  
experimenting.  Item -1 is the line number within the handler, -2 is  
the name of the handler and item 1 to -3 is the long id of the object  
the handler is in.

It does miss some handlers.  For example, it misses any handlers  
executing 'wait ... with messages'.  (That might be there to solve  
some other problem.)  In some cases you can find the skipped handler  
but that might take some work.

Dar





More information about the use-livecode mailing list