Re: [Vala] Question about signal connection



On Sat, Nov 07, 2009 at 14:47:16 +0100, Nicolas wrote:
Signal.connect(monitor, "changed", (GLib.Callback)handler2, monitor);

No. That won't work without some magic applied to handler2, because the call
signature for signal handlers is different from regular methods. The normal
syntax:

    object.signame.connect(invocant.handler)

is easier and better.

(I assume you didn't mean to pass the same object as emitter and handler
invocant above, as that makes no sense)

-- 
                                                 Jan 'Bulb' Hudec <bulb ucw cz>



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]