Re: [Vala] timers with callbacks
- From: "Levi Bard" <taktaktaktaktaktaktaktaktaktak gmail com>
- To: "Sam Liddicott" <sam liddicott com>
- Cc: Vala-list gnome org
- Subject: Re: [Vala] timers with callbacks
- Date: Thu, 19 Jun 2008 19:16:52 -0400
The biggest difficulty I have is working out how the various functionalities
have been made available to vala, the various functions seem to be scattered
in different classes and namespaces. glib.vapi has class TimeoutSource,
namespace Timeout, class Timer.
Here's what I'm using in my code:
using GLib;
uint timerID = Timeout.add(interval, callback);
// Meanwhile, back at the ranch...
Source.remove(timerID);
However, I agree (and have mentioned before, iirc) that remove()
should either be moved to or have an equivalent in the Timeout class.
--
http://www.dreamsongs.com/MobSoftware.html
http://www.gnu.org/philosophy/shouldbefree.html
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]