[Vala] Multiple properties, one signal for any change.



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]