A nagging problem with controlling data entry
Charles Szasz
cszasz at mac.com
Thu Jul 17 22:02:05 EDT 2008
I have run into a nagging problem with controlling data entry by the user. I
used the following code to limit input to three numbers:
on keyDown pkey
if pKey is in "1234567890" and the number of chars of target <4 then
pass keydown
end keyDown
I also use the following script in the sext entry field to make sure that
the user enters a score of 90 or higher:
on exitField
if field "score" < 90
then
answer information "The total score must be 90 or higher before a
computation can be completed."
focus on field "ach"
delete the selection
end if
end exitField
The problem arises when I am testing the program. It will provide a dialog
when a number less than 90 is entered in the text field as expected. But
sometimes it will NOT let me enter a number or go to the next field! I have
tried deleting the focus and the selection from the code but that did not
work either.
On several occasions, I have to force quit Rev because changing from browse
to edit mode did not solve the problem.
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?
--
View this message in context: http://www.nabble.com/A-nagging-problem-with-controlling-data-entry-tp18521298p18521298.html
Sent from the Revolution - User mailing list archive at Nabble.com.
More information about the use-livecode
mailing list