I'm trying to call CLib API from Seed. In JS there is a setTimout API. But not in Seed.
So I use GLib to make a delay
function:
delay = function(time, func) {
return GLib.timeout_add(time, func);
};
It gives error:
(seed:26406): GLib-CRITICAL **: g_timeout_add_full: assertion `function != NULL' failed
** (seed:26406): CRITICAL **: Line 9 in w.js: ConversionError Can not convert Javascript value to boolean
What is the right way to write it?
Since I didn't found an detailed JS API for Seed. I tried to read the docs for C.
And it looks awful..
http://developer.gnome.org/pygobject/stable/glib-functions.html#function-glib--get-current-time