Am Freitag, den 20.02.2009, 18:16 +0100 schrieb Koen Deforche: > Hey Goetz, Hello Koen,
> 2009/2/20 Goetz Babin-Ebell <[email protected]>: > > Hello, > > > > I'm a little bit confused about the change in revision 1.2 of > > src/Wt/WLineEdit.C: > > > > Index: src/Wt/WLineEdit.C > > =================================================================== > > RCS file: /opt/cvs/wt/src/Wt/WLineEdit.C,v > > retrieving revision 1.1 > > retrieving revision 1.2 > > diff -u -r1.1 -r1.2 > > --- src/Wt/WLineEdit.C 15 Jul 2008 06:25:49 -0000 1.1 > > +++ src/Wt/WLineEdit.C 28 Jan 2009 20:11:14 -0000 1.2 > > @@ -39,6 +39,8 @@ > > content_ = text; > > flags_.set(BIT_CONTENT_CHANGED); > > repaint(RepaintPropertyIEMobile); > > + > > + setStyleClass(validate() == WValidator::Valid ? "" : "Wt-invalid"); > > } > > } > > > > The only note in the Changelog that might cause this is > > * fix bug causing mouseup being called twice at end of drag (for > > example confused mandlebrot example) > > Oops, this change slipped through the Changelog, and yes, is a bit > intrusive... > This change is intended to set an invalid style to inputs that do not > validate(). > > > This change requires me on every change of the content of the WLineEdit > > to first fetch the old style, make my change and reset the old style. > > Do you use a validator on the affected WLineEdit ? No we don't. At now we always validate user input on the server. Our WT application does some validation, but primarily validation is done in backend daemons. > If not, we can easily make sure your current behavior is not affected. That would be good. > > Is there some greater meaning that I simply don't grasp ? > > The whole idea is that now that all built-in validators have > javascript implementations that allow instant feedback. For > consistency, we want to do this for also for server-side changes. That can be a good idea > This feedback is reflected by setting or removing a style class. The > caveat currently, which you hit, is that it assumes that you do not > set any other style class on a form widget This is a K.O. for us, since we do set style classes for almost every widget we add... > (we might relax this at > some point in the future when we support adding and removing a style > class, rather than only being able to set all style classes). Perhaps add an "verify fail" style class, that is automagically set if verify fails... Bye Goetz -- Goetz Babin-Ebell <[email protected]> 4G Systems GmbH & Co KG ------------------------------------------------------------------------------ Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H _______________________________________________ witty-interest mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/witty-interest
