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



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]