I propuse an abstract const function that will be overriden by widgets that
will represent the default value, and adding a constructor with an option to
select a defualt value.
I'll make a test case and send it to you.
2010/10/11 Aleksey Chirkin <[email protected]>
> If it has constructor without value, that it have default value. For
> WLineEdit - empty value. For WComboBox - first item. You may add
> setDefaultText(), or setText(value, bool default). But personally I do
> not need to modify the default values.
>
> 2010/10/11 Koen Deforche <[email protected]>:
> > Hey Aleksey,
> >
> > 2010/10/4 Aleksey Chirkin <[email protected]>:
> >> Hi!
> >>
> >> It would be nice implement the method WFormWidget::reset() (or clear()).
> >> Sometimes I need to reset the form (like reset on html form), but
> >> WFormWidget has no general method for reset data to default value.
> >
> > In fact, widgets like WLineEdit or WComboBox do not even have the
> > concept of a "default" value. Should that be the last value set using
> > setText() or setCurrentIndex() ?
> >
> > Regards,
> > koen
> >
> >
> ------------------------------------------------------------------------------
> > Beautiful is writing same markup. Internet Explorer 9 supports
> > standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3.
> > Spend less time writing and rewriting code and more time creating great
> > experiences on the web. Be a part of the beta today.
> > http://p.sf.net/sfu/beautyoftheweb
> > _______________________________________________
> > witty-interest mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/witty-interest
> >
>
>
> ------------------------------------------------------------------------------
> Beautiful is writing same markup. Internet Explorer 9 supports
> standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3.
> Spend less time writing and rewriting code and more time creating great
> experiences on the web. Be a part of the beta today.
> http://p.sf.net/sfu/beautyoftheweb
> _______________________________________________
> witty-interest mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/witty-interest
>
------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3.
Spend less time writing and rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
_______________________________________________
witty-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/witty-interest