Re: [Vala] Passing a callback function as an argument and connect to activate signal, cannot convert error....
- From: Axel FILMORE <axel filmore gmail com>
- To: Luca Bruno <lethalman88 gmail com>
- Cc: vala-list gnome org
- Subject: Re: [Vala] Passing a callback function as an argument and connect to activate signal, cannot convert error....
- Date: Fri, 27 Apr 2012 21:19:38 +0200
Thanks Luca, it works great.
Marvelous.
:)
On 27/04/2012 20:36, Luca Bruno wrote:
On Fri, Apr 27, 2012 at 7:15 PM, Axel FILMORE <axel filmore gmail com
<mailto:axel filmore gmail com>> wrote:
But I try to add some actions dynamically so I'd like to pass the
callback as an argument.
What I'm doing wrong ?
Nothing, Vala still does not support passing delegates to signal
handlers. You have to use a lambda instead, something like:
signal.connect ((foo, bar) => delegate(foo, bar););
--
www.debian.org <http://www.debian.org> - The Universal Operating System
--
Axel FILMORE
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]