Sending keyDown

DunbarX at aol.com DunbarX at aol.com
Mon Oct 26 11:54:51 EDT 2009


Jim.

Thanks for the reply. A lot has happened since that first post. Read the 
whole thread (actually, 2) if you dare. I believe there is a bug in the "send" 
command, though some disagree. Using "dispatch" in the same place works 
just fine.

The code is in the field script; the target is preserved. I only sent the 
message to the stack because there is no "send message to top" option 
(originally I had "send 'keydown' to Hypercard". However, "Dispatch" seems to be 
able to deal with it.

My original intent was to have the char written into the field, and then do 
stuff with the new text in the very same handler. The "send" command was at 
the very beginning. I could not "pass" keyDown as that terminates the 
handler. I had found several workarounds, and helpful others suggested even 
better ones.

Craig Newman


In a message dated 10/26/09 11:26:27 AM, jimaultwins at yahoo.com writes:


> To me it does not make sense to send the keyDown to the stack script.
> If it *did* work, you would be telling the engine to send a typed 
> character to the stack object, not a field object.
> 
> If the keydown occurs in a field, then it can be trapped, steps taken, 
> then the pass command used.
> From the docs for the 'pass' command
>    Important!  You cannot use the pass command to pass a message that 
> was originally sent with the send command.
> 




More information about the use-livecode mailing list