Handling Key Messages

Gregory Lypny gregory.lypny at videotron.ca
Fri Jul 28 08:52:15 EDT 2006


Hello everyone,

I seem to be spending so much time doing complex calculations, that  
I'm fumbling with some basic interface stuff.  I have a card that  
does some basic stats.  I want the user to be able to enter numbers  
in fields, and every time a number is entered, or when they hit  
Enter, Tab, or Return, I want all the number fields to be updated  
according to a handler and the cursor to enter the next field.  I  
have the fields set to autotab.

Does the following look about right?  It works, but is a little slow  
in my opinion.

(On a related issue, why is it that I get an error [can't find the  
handler] when I try to send an EnterInField or similar message to a  
field?)

on rawKeyUp theKey
   if theKey is among the items of (65293,65289,65421) or \
   theKey is an integer
   then
     updateCalculation
   end if
end rawKeyUp

Any thoughts are most appreciated.

Regards,

	Gregory





More information about the use-livecode mailing list