Re: Something to triger
- From: "A. Pagaltzis" <pagaltzis gmx de>
- To: gtk-perl-list gnome org
- Subject: Re: Something to triger
- Date: Tue, 12 Jul 2005 14:22:50 +0200
* Chris Debenham - PTS Engineer <Chris Debenham Sun COM> [2005-07-12 07:30]:
Two ways to do this (that I can think of)
Add a timeout to populate the list.
ie.
$timer = Glib::Timeout->add($interval, \&populate_list)
Which is the canonical way, really. And by returning a false
value from `populate_list` after the procedure finishes running
the timeout will automatically be removed.
Note that if the procedure takes a long time to run, your GUI
will be unresponsive meanwhile (no reaction to clicks, no
redrawing if your window was intermittently obscured by another,
etc), so you might want to sprinkle a few
Gtk2->main_iteration while Gtk2->events_pending;
in strategic locations anyway so as to give Gtk a chance to react
to events while youâre busy doing something else.
Regards,
--
#Aristotle
*AUTOLOAD=*_=sub{s/(.*)::(.*)/print$2,(",$\/"," ")[defined wantarray]/e;$1};
&Just->another->Perl->hacker;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]