[Glade-devel] Property Binding Support: Present and Future

Am 01.09.2011 10:32, schrieb Alexandre Mazari:
Hi  Denis,

Thanks you very much for this amazing work.


I was wondering if the current code allows the binding of a 'model'
instance property to a widget's one. By model I mean non-graphical
non-glade-handled GObject. Is there some way to expose some arbitrary
GObject in the GtkBuilder context so we can bind its properties ?

This is currently not supported. It would also be problematic, as we 
could not check if the property binding is valid (that is, whether the 
type is correct etc.) when an external object is involved. Also, one 
would still have to match any referred-to placeholder objects with real 
ones in code, so I'm afraif that declaring bindings with external 
objects in the UI file wouldn't by you much.

A special case, however, is bindings to GSettings objects, which might 
be supported in the future.

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.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]