Some of the validations will require a database
lookup, possibly on a remote machine. Doing
this on each keystroke could result in a very
slow response.
Another case is when only certain symbols
are valid input, but the number of
possibilites is too large and too diverse.
In a certain case I have in mind (crystallo-
graphic space group symbols), the validation
could be done fast enough on each keystroke,
but while the user is typing, the status
indicator (for example the background color)
would change all the time. This could be
quite annoying. However, your idea of using
a timer is very interesting. Once I am more
familiar with wxPython and the
fundamental problems are solved (see my
other posting) I will explore this idea.
Thanks!
Ralf
···
--
On Thu, 3 Aug 2000 09:33:35 [drone] wrote:
I think your question has been answered, but I would like to address another
point:If I was a user of your software, by indicating that I made a mistake only
after I switch away, I have to switch back to correct the error. This could
get annoying very quickly, especially if I don't know how to fix the error
and I try something, switch away, no, go back, change it, switch away, still
didn't get it, etc... (Trust me, there are users out there that do this)I don't know why you want the following to hold:
I do not want to do this validation while
the user is still typing....but one thing to try is to trigger validation AFTER the user has stopped
typing, but BEFORE he/she switches away. This can be done with a timer,
that's activated when a key is hit, then de-activated/re-activated (or
reset) when another key is hit, until the user stops long enough for the
timer to trigger the validation function (about half a second to a second),
which turns off the timer (until another key is hit), validates the contents
of the field and then points out the error in a nice way to the user, like a
squiggly line under the text or a message in the status bar, etc..Just-my-2-cents-on-usability-ly y'rs...
----------------------------------------------------------------------
Olivier A. Dagenais - Carleton University - Computer Science III----- Original Message -----
Message: 1
To: wxpython-users@wxwindows.org
Date: Wed, 02 Aug 2000 09:58:46 -0700
From: "Ralf Grosse-Kunstleve" <rwgk@my-Deja.com>
Reply-To: rwgk@my-Deja.com
Organization: My Deja Email (http://www.my-deja.com:80)
Subject: [wxPython] event "wxTextCtrl loses focus"?
Reply-To: wxpython-users@wxwindows.orgI would like to present a data input form
using wxPython. E.g., using wxTextCtrl:parameter 1 _____________
parameter 2 _____________The underlines represent the input fields.
I would like to do some validation for
each parameter when the user hits Enter
or switches between the input fields.
I do not want to do this validation while
the user is still typing.I figured out how to use
EVT_TEXT_ENTER(self, ID, self.EvtText)
to trigger the validation when the users
hits enter. Unfortunately, my experiments
with EVT_KILL_FOCUS have not been
successful. How can I register an
event handler that gets called when a
wxTextCtrl input field loses focus?Are there wxPython applications with
data input forms that I could use for
learning?Thanks for any help!
Ralf--== Sent via Deja.com http://www.deja.com/ ==--
Before you buy._______________________________________________
wxPython-users mailing list wxPython-users@wxwindows.org
http://wxwindows.org/mailman/listinfo/wxpython-users
--== Sent via Deja.com http://www.deja.com/ ==--
Before you buy.