Re: [Vala] Accessing "base" property of Gtk.Style



Hi,
 
if you look at the corresponding vapi file, you can see that the 'base' attribute has been renamed to '@base' in order to prevent this error *.
 
* It's just a quick answer I haven't test this.
 
2008/9/15, Federico Pelloni <federico pelloni gmail com>:
Hello everyone!

I just started learning Vala, trying to write a small utility with Gtk.

I'm trying to set the background color of a Gtk.EventBox, to the
default "base" color as specified by the choosen gtk theme, reading it
from the window's style.
I'm doing this:

Gtk.EventBox container = new Gtk.EventBox();
Gtk.Style style = this.get_style();
container.modify_bg(Gtk.StateType.NORMAL, style.base[(int)
Gtk.StateType.NORMAL]);

But valac hangs with this error:

/home/fredp/Progetti/ejecter-vala/src/ui.vala:63.57-63.60: error:
syntax error, unexpected base

I guess "base" is a reserved word (gedit highlights it).
How can I workaround this?

Thank you

P.s.: do multiline strings (as in Python) exist in Vala?
_______________________________________________
Vala-list mailing list
Vala-list gnome org
http://mail.gnome.org/mailman/listinfo/vala-list



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]