[Glade-devel] Property Binding Support: Present and Future
Tristan Van Berkom
tristan.van.berkom at gmail.com
Thu Sep 1 16:49:12 EDT 2011
On Thu, Sep 1, 2011 at 10:07 PM, Denis Washington <denisw at online.de> wrote:
> Am 01.09.2011 20:55, schrieb Tristan Van Berkom:
>>>> Regarding transformation, would'nt providing default transformations
>>>> (int<-> string, percentage<-> double in 0...1, etc.. ) make you life
>>>> easier by not supporting user provided functs while covering 90%
>>>> percent of use cases ?
>>>
>>> That's a nice idea and would also benefit programmatic uses of
>>> g_object_bind_property(). These functions would have to be in GLib,
>>> though; otherwise, using them would require an external library where
>>> they are defined in.
>>
>> GBinding already defaults to using default transformation functions.
>
> Really? This isn't documented anywhere. Thanks for mentioning! I admit
> that this makes the need for transformation functions much less
> pressing, but they are still a very useful feature.
Yeah, the best documentation I find is, when calling the _bind_full() function
and passing a NULL transform function "the default will be used" ;-)
In gbinding.c its quite clear... the default is to try g_value_copy() first and
then resort to g_value_transform().
Cheers,
-Tristan
More information about the Glade-devel
mailing list