On 17/11/2013 11:14, Luca Bruno wrote:
https://developer.gnome.org/gobject/stable/gobject-The-Base-Object-Type.html#GObject-notify
In vala should be obj.notify.connect (...).
Sweet, thanks.
Small demo:
public class Stuff : Object {
public string prop1 {get;set;}
public string prop2 {get;set;}
public string prop3 {get;set;}
}
public void changed( ParamSpec p) {
stdout.printf("Changed %s\n", p.get_name ());
}
public void main() {
var s = new Stuff();
s.notify.connect ( changed );
s.prop1 = "Foo";
s.prop2 = "Bar";
s.prop3 = "Baz";
}
\d
_______________________________________________
vala-list mailing list
[email protected]
https://mail.gnome.org/mailman/listinfo/vala-list