Inserting an idle handler into the message path

jps2 jps2 at ualberta.ca
Sun Nov 23 18:14:49 EST 2003


>===== Original Message From Dar Scott <dsc at swcp.com> =====
>On Sunday, November 23, 2003, at 12:53 PM, Jason Spencer wrote:
>
>> I had similar problems, and worse performance, using "send...to".
>
>What kinds of problems?

I am using a stack with "start using" and then in the "on libraryStack" 
handler I insert scripts into the front and back. I can call handlers in these 
scripts from the main (non library) stack without a problem, but messages 
generated in these scripts never reach the original stack, they seem to be 
only passed through the library stack itself.

Am I going about this in the wrong way? I'd like to extend the message path to 
have custom events pass through the stack that is using the library.

Some background: I'm making a library for an alternative input device. I'd 
like the library to be able to generate events similar to mouseUps that can be 
caught anywhere in the user's stack. Everything's working nicely (with 
send...to or with idle) until I try to turn it into a library.

I could write an external to do this I suppose, but I imagine I'd still have 
to have the user insert some backscripts so that any uncaught events don't hit 
the engine and generate an error.

Or maybe I'm missing another way to solve this?

thanks,

-j.




More information about the use-livecode mailing list