Re: [Vala] Struct property bug: get, but not set
- From: Nor Jaidi Tuah <norjaidi tuah ubd edu bn>
- To: vala-list <vala-list gnome org>
- Subject: Re: [Vala] Struct property bug: get, but not set
- Date: Mon, 2 May 2011 14:10:19 +0800
Not a bug.
Explanation:
http://bugzilla.gnome.org/show_bug.cgi?id=621787
So, the code
var button = new Gtk.ColorButton ();
button.color.red = 100; /*1*/
should have been invalid. (A compiler bug, but
a different kind).
But, since vala is a higher level language than C,
is there any strong reason to absolutely treat
"button.color.red = 100" as invalid. Can't the
compiler treat it as a shortcut for:
var c = button.color;
c.red = 100;
button.color = c;
? Are there any cases where such shortcuts do not
work?
hand
Nor Jaidi Tuah
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]