Re: [Vala] timers with callbacks



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]