Re: Problem using idle_add method



Niel Das said:
I noticed that the idle_add method has been deprecated in Gtk2 in favor
of the corresponding Glib functions.  Hence, I cannot make a call such as

Gtk2->idle_add(\&callback_function, $data);

However whenever I use "Glib->idle_add(\&callback_function, $data)"
instead, I get the following output error:

the "corresponding Glib functions" are actually

  Glib::Timeout->add()
  Glib::Idle->add()
  Glib::IO->add_watch()
  Glib::Source->remove()

http://gtk2-perl.sourceforge.net/doc/pod/Gtk2/api.html#MISSING_METHODS


but be very careful with idles --- they can really soak up CPU cycles if you
don't get the priorities right.  a timeout at about 200ms may be easier on
your system's load.


-- 
muppet <scott at asofyet dot org>



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