[Vala] Vala Compiler Error? property notify signal handler gets wrong parameter value.
- From: bsquared <bwcode4u gmail com>
- To: vala-list <vala-list gnome org>
- Subject: [Vala] Vala Compiler Error? property notify signal handler gets wrong parameter value.
- Date: Mon, 19 Sep 2011 00:08:32 -0700
Hello,
I ran into a strange problem with a simple string property notify signal.
public string sz_uri { get; set construct; }
I connected the signal in construct like so.
construct {
this.notify["sz_uri"].connect(uri_on_change);
}
private void uri_on_change(ParamSpec p) { ... }
But the on change method did not run when I set the property. Neither
in construction nor later assignment.
I changed the handler like so.
this.notify.connect ( (s,p) => { stdout.printf ("on_change %s", p.name) });
And was surprised that the propert name was incorrect. The output was:
on_change sz-uri
But it should have been 'on_change sz_uri'.
** It had somehow changed the underscore to a hyphen.
What could possibly be causing this?
$ valac --version
Vala 0.14.0
--
Regards,
-Brian
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]