Re: [Vala] Passing a callback function as an argument and connect to activate signal, cannot convert error....



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]