Re: [Vala] Multiple properties, one signal for any change.
- From: Luca Bruno <lethalman88 gmail com>
- To: Donn <donn ingle gmail com>
- Cc: vala-list <vala-list gnome org>
- Subject: Re: [Vala] Multiple properties, one signal for any change.
- Date: Sun, 17 Nov 2013 10:14:34 +0100
https://developer.gnome.org/gobject/stable/gobject-The-Base-Object-Type.html#GObject-notify
In vala should be obj.notify.connect (...).
On Sun, Nov 17, 2013 at 6:20 AM, Donn <donn ingle gmail com> wrote:
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
_______________________________________________
vala-list mailing list
vala-list gnome org
https://mail.gnome.org/mailman/listinfo/vala-list
--
www.debian.org - The Universal Operating System
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]