G.S.Alex píše v Po 07. 12. 2009 v 20:47 +0800:
I used to think the delegate could be used just like method it self . But when I try to connect a delegate to a signal , i got the error: ------------------------------------------------ t.vala:24.29-24.29: error: Argument 1: Cannot convert from `DN' to `Foo.some_event' foo.some_event.connect (d); ------------------------------------------------ So, how could I do that?
Unless I'm missing something, that seems to be a bug in Vala. I checked the bugzilla and couldn't find any mention of it, so you probably should report it there. As a workaround, you can use "connect (() => d());", but I think it won't work if you wish to disconnect it later. Is there a support to disconnect based on a handler id? I think the last time I checked it wasn't possible.
Attachment:
signature.asc
Description: Toto je digitálně podepsaná část zprávy