[Vala] Multiple properties, one signal for any change.
- From: Donn <donn ingle gmail com>
- To: vala-list <vala-list gnome org>
- Subject: [Vala] Multiple properties, one signal for any change.
- Date: Sun, 17 Nov 2013 07:20:25 +0200
Hi,
Let's say I have a class that holds a bunch of properties:
public class Prop : Object {
public double x {get; set; default=0.0;}
public double y {get; set; default=0.0;}
public double r {get; set; default=0.0;}
public double g {get; set; default=0.0;}
public double b {get; set; default=0.0;}
public double a {get; set; default=1.0;}
}
Is there a standard vala/gobject way to connect a notify *once* that
will fire whenever *any* of those properties are set?
Right now I'm going to do this kind of thing:
public signal zap();
private double _x;
public double x {
get {return _x;}
set {_x=value; this.zap();}
}
etc. for each property ..
Just wondering :)
Ta,
\d
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]