Why "value" is not a property then?

On Tue, Jul 13, 2010 at 11:09 AM, MartinWittemann <[email protected]
> wrote:

>
> Hello sub,
>
>
> sub wrote:
> >
> > Setting the value property with a different representation throws a type
> > error.
> >
> Thats exactly how we designed it. We had some discussions about that and we
> ended up with a simple rule: a property always returns exactly the value it
> was set to. So the problem is that the widgets need some data type like the
> text field needs a string. Setting  a number and converting it
> automatically
> to a string would save the given value as a string and thus return a string
> and not a number.
>
>
> sub wrote:
> >
> > Has anyone else experienced this (or have I got it wrong)?
> >
>
> We are aware of this situation and added an easy way to add custom
> converter
> to your bindings. But still we know that these converters are a lot of work
> for things that could just work.
> Another thing we included into the data binding is default conversion which
> takes care of such things in some cases. But why only some cases? Because
> the binding needs a way to find out the target type and needs to have an
> easy way to convert the current value to that type. Properties do have a
> type check the binding also checks and uses for that default conversion.
> But
> this is only working with properties and not all getter / setter pairs are
> properties in the framework like the value in the textfield.
>
> We know that this is not an optimal solution but its the best we currently
> have because we don't want to break the rule of getting exactly the thing
> which was set.
> Maybe there is a need for setter methods to specify their data type which
> can be used by the data binding but currently I have no idea how to get
> that
> done.
>
> Regards,
> Martin
> --
> View this message in context:
> http://qooxdoo.678.n2.nabble.com/data-types-for-form-fields-and-their-affect-in-data-binding-tp5286833p5287615.html
> Sent from the qooxdoo mailing list archive at Nabble.com.
>
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by Sprint
> What will you do first with EVO, the first 4G phone?
> Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
> _______________________________________________
> qooxdoo-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>
------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to