Re: [Vala] Passing a callback function as an argument and connect to activate signal, cannot convert error....
- From: Luca Bruno <lethalman88 gmail com>
- To: Axel FILMORE <axel filmore 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 20:36:08 +0200
On Fri, Apr 27, 2012 at 7:15 PM, Axel FILMORE <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 - The Universal Operating System
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]