Re: [Vala] timers with callbacks



Levi Bard wrote:
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.
  

Thanks - I hadn't noticed that Source.Remove was a static method.

Sam


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]