Re: [Vala] Dbus, connecting a signal to an async method...
- From: Jan Hudec <bulb ucw cz>
- To: Marco Trevisan (Treviño) <mail 3v1n0 net>
- Cc: vala-list gnome org
- Subject: Re: [Vala] Dbus, connecting a signal to an async method...
- Date: Sun, 5 Dec 2010 21:10:26 +0100
On Sat, Dec 04, 2010 at 12:35:26 +0100, Marco Trevisan (Treviño) wrote:
Il giorno ven, 03/12/2010 alle 17.18 +0100, Abderrahim Kitouni ha
scritto:
session_proxy.name_acquired.connect (this.name_acquired);
What I would have done is:
session_proxy.name_acquired.connect ((name) => this.name_acquired.begin(name));
Ok, cool this works thanks. However in this case the lambda should be
(p, name) => this.nameacquired.begin(p, name); ;-)
However I guess that this is just a workaround, the related bug should
be fixed!
It's not a bug. The 'async' is part of the function signature, so the
function signatures don't match and it can't be converted.
It might be a missing feature, but I think it's preferable to explicitly
require the .begin.
You can also try to pass the begin method directly (but I'm not sure it
works).
No, I tried that, but it didn't work, I got an error since the begin
return value was considered just like a void.
Hm, the begin function returns a void, but that's what the signal expects
anyway, so it seems like that one should work. That would be a bug than.
--
Jan 'Bulb' Hudec <bulb ucw cz>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]