[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: firstname.lastname@example.org
- Subject: Filtering editable-text-dialog-item's
- From: email@example.com (Matthew Cornell)
- Date: Thu, 19 Sep 91 10:06:16 EDT
- Cc: Thad.Humphries@p0.f716.n109.z1.FidoNet.Org
... how to filter an editable-text-dialog-item such that a user can
only enter a number.
You might let users do all their typing (non-number input included)
then check when they indicate they're done (i.e. when they hit the "Do
It" button). You check if lisp can read-from-string the thing as a
number: (numberp (read-from-string their-input-string)). If not then
indicate bad input (i.e. beep and a message dialog) and let them
continue editing. You could attach the action to the "Do It" button if
you're using a modal dialog, or to window-close if you have a close box.