A nagging problem with controlling data entry

Ken Ray kray at sonsothunder.com
Fri Jul 18 03:05:05 EDT 2008



> I am using Rev 2.9 on a Mac. I have autoTab checked. The field is not
> locked. Is there a better code to check for numeric entry and monitor the
> entry of certain values in a text entry field?

I would recommend using a "send in time" command - gives the
'exitField'/'closeField' time to complete before the dialog is displayed.
BTW, 'exitField' is sent only when there are NO changes in the field;
'closeField' is sent when there ARE changes, so that's the one you probably
want to trap. Anyway, here's what I mean:

on exitField
     if field "score" < 90
     then
       send "TooLow" to me in 20 milliseconds
     end if
end exitField

on TooLow
     answer information "The total score must be 90 or higher before a
computation can be completed."
     focus on field "ach"
     delete the selection
end TooLow


Ken Ray
Sons of Thunder Software, Inc.
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/





More information about the use-livecode mailing list