Re: [BLACKBOX] limiting integer values in interactor field

From: [at]} <Bob>
Date: Tue, 12 Jan 2010 09:05:43 -0000

----boundary-LibPST-iamunique-870449294_-_-
Content-type: text/plain

OK, I don't fully understand your application, but if the 3 controls you
point to in the screenshot calculate their values using the IN value, and
the IN value must be within a specific range, I would put the range check in
the calculations, trigger them with an Update message sent by IN's notifier,
and leave the 3 controls blank and/or display some sort of error while the
IN value is out of range.

Bob

> -----Original Message-----
> From: BlackBox [mailto:BLACKBOX{([at]})nowhere.xy
> Gunnar Bernhardt
> Sent: 12 January 2010 07:10
> To: BLACKBOX{([at]})nowhere.xy
> Subject: Re: [BLACKBOX] limiting integer values in interactor field
>
> 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
>


----
To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to LISTSERV{([at]})nowhere.xy----boundary-LibPST-iamunique-870449294_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"
e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGRlZmYwe1xmb250dGJsDQp7XGYwXGZz
d2lzcyBBcmlhbDt9DQp7XGYxXGZtb2Rlcm4gQ291cmllciBOZXc7fQ0Ke1xmMlxmbmlsXGZjaGFy
c2V0MiBTeW1ib2w7fQ0Ke1xmM1xmbW9kZXJuXGZjaGFyc2V0MCBDb3VyaWVyIE5ldzt9fQ0Ke1xj
b2xvcnRibFxyZWQwXGdyZWVuMFxibHVlMDtccmVkMFxncmVlbjBcYmx1ZTI1NTt9DQpcdWMxXHBh
cmRccGxhaW5cZGVmdGFiMzYwIFxmMFxmczIwIE9LLCBJIGRvbid0IGZ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yDQpUbyB1bnN1YnNjcmliZSwgc2VuZCBh
IG1lc3NhZ2Ugd2l0aCBib2R5ICJTSUdOT0ZGIEJMQUNLQk9YIiB0byBMSVNUU0VSVkBMSVNUU319
AGcwS1BpQmNkR0ZpSUdF
----boundary-LibPST-iamunique-870449294_-_---
Received on Tue Jan 12 2010 - 10:05:43 UTC

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