Hi, On Sun, 2010-06-20 at 17:57 +0200, Frederik wrote: > GLib/GObject 2.26 will add property binding [1]. The straightforward way to > support this in Vala would be: > > Object.bind_property (foo, "x", bar, "y"); > Object.bind_property (foo, "x", bar, "y", BindingFlags.BIDIRECTIONAL); > > However, this is not very type-safe. Would direct language support be > reasonable? E.g. something like > > foo.x +> bar.y; // default > foo.x <+> bar.y; // bidirectional > > Or is it too cryptic?
We don't need special syntax for every available GObject method. Let's first have a plain binding and see how it will be used. If we see a very common pattern where syntactic sugar would help a lot, we can reconsider adding syntactic sugar. > And how to deal with 'g_object_bind_property_full'? It takes two > TransformFuncs > but only one user_data/GDestroyNotify pair. This will be fixed, I talked to ebassi on IRC. Jürg _______________________________________________ vala-list mailing list vala-list@gnome.org http://mail.gnome.org/mailman/listinfo/vala-list