Dispatch-Sending keyDown

Richmond Mathewson richmondmathewson at gmail.com
Fri Oct 23 15:14:00 EDT 2009


I thought I would be 'clever' having read
what the Documentation says about DISPATCH
and did this:

on keyDown var
   dispatch "keydown" with var
end keyDown

and fell foul of a recursion problem.

I quote from a user-note contributed by somebody called
OLIVER (Hello, Oliver, are you reading this? Because your
input would be extremely welcome.):

"Be careful to ensure when using dispatch recursively that an infinite 
loop won't be caused. For example something like this will never 
terminate unless a child handles the message:

command updateView
   dispatch "updateView"
end updateView

This applies equally to the send and call commands."

Obviously the keydown IS being dispatched SOMEWHERE . . .  :)



More information about the use-livecode mailing list