On Tue, Aug 9, 2011 at 11:07, Alexander Steitz <[email protected]>wrote:

> Hi Alexandr,
>
> On Tuesday 09 August 2011 13:03:39 alexandr wrote:
> > Is this qooxdoo bug?
> As far as I can say this is more a thing of program flow. The point here is
> that you use the "changeValue" event to check for the user input and - if
> necessary - reset the value. So you're reacting on the user input and the
> value is already synced with the textfield.
> A better approach would be to check the input value of the user *before*
> the
> value is synced with the textfield. So you're in an active role and can
> hold
> back the changes you don't allow.
>
> Check out the "qx.ui.form.AbstractField" class (which is the base class of
> the
> "qx.ui.form.TextField" class) and try to overwrite the "_onHtmlInput"
> method.
> Maybe this will solve your problems (just a hint, since I didn't wrote a
> line
> of code)
>

I spent some time this morning trying to figure out what was going on. The
problem is that the changeValue event handler does not get called on the
third dot of the input sequence "12...". The first dot is inserted because
it matches the allowable pattern. The second dot is excluded because it does
not match the pattern, and the third dot is add (violating the pattern)
because the changeValue handler doesn't even get called to allow testing it.

I was referring to AbstractField as I was working with this, and I tried not
using the filter which causes the extra processing in AbstractField. The
problem still occurred. I also played with using the "input" event rather
than liveUpdate and "changeValue", with similar results.

This does appear to be a bug in qooxdoo.

Derrell
------------------------------------------------------------------------------
uberSVN's rich system and user administration capabilities and model 
configuration take the hassle out of deploying and managing Subversion and 
the tools developers use with it. Learn more about uberSVN and get a free 
download at:  http://p.sf.net/sfu/wandisco-dev2dev
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to