[Tutor] PythonCard error checking
alan.gauld at btinternet.com
Mon Dec 24 18:24:27 CET 2007
"Roy Chen" <roychenlei at gmail.com> wrote >
> I have a textField, and I wish to check that only integers
> within a certain range are entered into it.
Not sure about PythonCard but most GUI toolkits, including
wxPython from which PythonCard is buil;t allow you to trap the
entry of data(usually with onKeyPress events or similar) so that
you can check the data as it is entered. You can then beep or
highlight the text if it is of the wrong type.
There will often be preconfigured entry boxes that automatically
check for currency, date/time, numeric, password types etc
I think there is a PythonCard mailing list which is likely to
be a better source than the tutor list.
Author of the Learn to Program web site
More information about the Tutor