[Glade-devel] Property Binding Support: Present and Future
- From: tristan.van.berkom at gmail.com (Tristan Van Berkom)
- Subject: [Glade-devel] Property Binding Support: Present and Future
- Date: Thu, 1 Sep 2011 22:49:12 +0200
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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]