Re: [Vala] Getting results from an async callback
- From: Matthias Klumpp <matthias tenstral net>
- To: tomw ubilix com
- Cc: vala-list <vala-list gnome org>
- Subject: Re: [Vala] Getting results from an async callback
- Date: Fri, 27 Jul 2012 17:34:38 +0200
Hi!
You recieve a AsyncResult in that callback. For examples how to use
PackageKit in Vala, see my Listaller[1] project or - for a
less-complex example (Listaller uses some internal PK APIs) - just
checkout this snipped which addresses your question:
http://bazaar.launchpad.net/~lubuntu-software-center-team/light-software-center/trunk/view/head:/src/Backend/AppsManager.vala#L90
(from Light Software Center)
Regards,
Matthias
----
[1]: http://listaller.tenstral.net
2012/7/27 tomw <tomw ubilix com>:
Hi,
trying to write some PackageKit code I came across the issue to get
results from an async call like:
pk_task.get_updates_async (filter,
null,
on_progress,
on_ready
);
and the respective callback:
private void on_ready () {
PackageKit.Results? result = null;
result = pk_task.generic_finish (???);
}
However, the generic_finish method requires an AsyncResult which should
be passed to the callback but I have not found a way to get access to
it? Any suggestions?
Thanks
--
tomw <tomw ubilix com>
_______________________________________________
vala-list mailing list
vala-list gnome org
https://mail.gnome.org/mailman/listinfo/vala-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]