I'm new at this, but why can't you validate the field when focus leaves the
field and warn the user and return focus to the field in question ?

Eric

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Ben
Combee
Sent: Tuesday, November 28, 2000 12:14 AM
To: Palm Developer Forum
Subject: Re: Keyboard Dialog and restricted input


"scott jacobs" <[EMAIL PROTECTED]> wrote in message
news:31322@palm-dev-forum...
>
> 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.

No real solution to your keyboard problem, but you're overlooking another
way to get invalid characters into the field.  You can enter them into
another field, copy the characters, then paste them into your special field.

It would be very nice if Palm provided a validated, constrained field, but
it really doesn't exist.



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


-- 
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