Re: [Vala] Vala Compiler Error? property notify signal handler gets wrong parameter value.
- From: bsquared <bwcode4u gmail com>
- To: vala-list gnome org
- Subject: Re: [Vala] Vala Compiler Error? property notify signal handler gets wrong parameter value.
- Date: Mon, 19 Sep 2011 09:48:32 -0700
After some sleep, I verified by running a test using peoperties with and
without underscores. The properties with underscores were changed in
the notify signal handler parameter.
I tried Vala 0.13.4 and 0.13.1, and the result was the same.
Here is a test:
/////////////////////////////
public class TestNotifySignal : GLib.Object {
public string simple { get; set construct; }
public string not_simple { get; set construct; }
public TestNotifySignal (string s1, string s2) {
Object ( simple: s1, not_simple: s2 );
}
construct {
this.notify.connect((s,p) => { stdout.printf("on_change : %s\n", p.name); });
}
public void start() {
simple = "new value";
not_simple = "yet another new value";
}
}
public void main(string[] args) {
var app = new TestNotifySignal("simple","not simple");
app.start();
}
/////////////////////////////////
output:
on_change : not-simple
on_change : simple
on_change : simple
on_change : not-simple
--
Regards,
Brian Winfrey
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]