Re: [BLACKBOX] limiting integer values in interactor field

From: [at]} <Gunnar>
Date: Tue, 12 Jan 2010 08:10:03 +0100


Folks,

hello again - and a happy new year to you! If Germans tend to be
impolite then I'm a text book example of a German. My apologies...

I changed my mail adress to another account, so please don't be confused
or alarmed!


{([at]})nowhere.xy

frustrating is just the word. :-|

I already used the technique you recommend for another problem. In the
first screenshot you may enter data for a customer like number, name and
place. If any of those is not sane, you may not save the record. In this
case using a seperate button and guard procedures works perfectly.

Unfortunately you can't alway do it this way. In the 2nd screenshot
three values are derived from one you may enter (IN in this case). The
calculation is done in the notifier procedure, which is called after
<each key press> in the interactor field. In this case a seperate button
to display derived values would be anything but user friendly.

To me this looks like the notifier is called as early as possible in
order to prevent transfer and processing of incorrect data as you
mentioned. My point is that you can not postbone it until later.
Consider data entry in HTML forms: you have an onChange event which is
called on leaving the field by placing the focus else where (as late as
possible).

Sorry the screen shots are not in English, but I hope they illustrate my
problem nonetheless.

greetings
gunnar

Bob Walkden schrieb:
> It can be frustrating that the Dialog module does not send a lostfocus
> opcode to notifiers. However, one purpose of validating the field is
> to prevent the operator from sending invalid data to whatever the next
> step in the process is. In that situation I generally use guards to
> check the value of the field, and disable the guarded controls (eg an
> OK button) until the field is valid.
> Bob
>
>
> ------------------------------------------------------------------------
> *From:* BlackBox [mailto:BLACKBOX{([at]})nowhere.xy
> *Bernhardt, Gunnar
> *Sent:* 11 January 2010 17:53
> *To:* BLACKBOX{([at]})nowhere.xy
> *Subject:* [BLACKBOX] limiting integer values in interactor field
>
> Hello all,
>
> there is an problem which came up recently: I wrote a little
> character sheet checker for a role playing game. The basic
> attributes are integer values, some of them between 3 and 18 (3W6
> in short).
>
> What I did: I had the Notifier procedure for this field check, if
> the entered value is in the valid interval and setting it to the
> upper respectively lower boundary value. Safe.
>
> The problem: If you want to enter a value > 10, you first have to
> type the letter <1>. Right now the notifier kicks in and changes
> it to 6 which is obviously undesired.
>
> Is there an elegant way to check the content of a field AFTER the
> input has been completed?
>
> I mean another way than putting a button there and having the user
> clock on it after each number he has entered. I could not for
> instance find an event like “onLeave” (moving the focus).
>
> regards
>
> gunnar
>



----
To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to LISTSERV{([at]})nowhere.xy








100112-02-problem.png
(image/png attachment: 100112-02-problem.png)

100112-01-ok.png
(image/png attachment: 100112-01-ok.png)

Received on Tue Jan 12 2010 - 08:10:03 UTC

This archive was generated by hypermail 2.3.0 : Thu Sep 26 2013 - 06:30:37 UTC