I'm hoping for guidance with either a technical or design problem I am
having with my application.  The application has a numeric text field for
which only a certain range of integer values will ever be appropriate.
My current plan is to prevent the user from ever entering invalid data.  

The field is already restricted to 3 characters and numerics only.
By handling the keyDownEvent I am able to restrict the user's input and
keep the numbers within the appropriate ranges.  However, when I use the
keyboard dialog I never get the keyDownEvents, presumably since the
dialog's event handler is getting them. Therefore the user can enter
numeric data outside the valid ranges.

I see three options for myself and am asking for comments on any of them.
What is the best solution?

1. Give up and let the user enter bogus data, warn them via a dialog, then 
force the data to take on an appropriate value.  If I go this route I feel I 
should also remove the restrictions when editing the field via graffiti.

2. Prevent the keyboard dialog from ever popping up.  I don't like this 
solution, since a user would then be forced into using graffiti to enter
the numbers.

3. Find some way to do keyDownEvent filtering on the system's keyboard
dialog event handler. I like this solution best, but am having trouble
locating any references and would need technical pointers.  I searched the dev
forum archive, checked the documentation at
http://www.cs.washington.edu/homes/swanson/palmos_dev_documentation/CombinedIX.html#540343
 
and consulted the Rhodes/McKeehan book. The dialog must call EvtGetEvent
itself since my main loop doesn't while the keyboard is up.  I'm at a loss.

scott

-- 
-------------------------------------------------------------------
scott jacobs                                     foveon corporation
-------------------------------------------------------------------

-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to