Re: [Vala] 0.7 signal syntax
- From: lode leroy <lode leroy gmail com>
- To: Levi Bard <taktaktaktaktaktaktaktaktaktak gmail com>, William Swanson <swansontec gmail com>
- Cc: vala-list gnome org
- Subject: Re: [Vala] 0.7 signal syntax
- Date: Wed, 22 Apr 2009 08:33:46 +0200
On Tue, Apr 21, 2009 at 3:12 PM, Levi Bard
<taktaktaktaktaktaktaktaktaktak gmail com> wrote:
I try replacing the line
drawing_area.expose_event += this.on_expose;
with
drawing_area.expose_event.connect(this.on_expose);
but this gives an error... could anyone enlighten me on what is the
correct syntax?
That is the correct syntax.
What is the error you're getting?
valac --pkg gtk+-2.0 --pkg cairo cairo.vala
Compilation failed: 1 error(s), 0 warning(s)
cairo.vala:23.37-23.50: error: Argument 1: Cannot convert from
`CairoSample.on_expose' to `Gtk.Widget.expose_event'
drawing_area.expose_event.connect(this.on_expose);
^^^^^^^^^^^^^^
make: *** [cairo] Error 1
I suspect it wants the first argument of on_expose() to be a Gtk.Widget.
On Wed, Apr 22, 2009 at 12:10 AM, William Swanson <swansontec gmail com> wrote:
The new syntax was introduced in Vala 0.7.1, not 0.7.0. Are you using
the latest point release?
yes, "0.7.1 signal syntax" I should have said in the subject
-- lode
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]