Re: Timers
- From: "A. Pagaltzis" <pagaltzis gmx de>
- To: GTK-Perl_Mailing_List <gtk-perl-list gnome org>
- Subject: Re: Timers
- Date: Fri, 1 Jul 2005 10:13:36 +0200
* Juan Josà 'Peco' San MartÃn <peco microbotica es> [2005-07-01 01:35]:
My issue is that I would like to attach the same timer but to
other widgets, in order to update many of them at the same
time. Surely that it's possible but I didn't find the way :-/
Thatâs nothing to do with Gtk2. You just need to know Perl.
muppetâs suggestion of a Heartbeat object is nice, particularly
if you need to do this kind of thing more than in one place. For
a simple one-off where extensibility is not a concern, you can
just use a closure:
my $timer = Glib::Timeout->add( 1000, sub {
progress_timeout( $label );
do_something_else( $progbar );
spin( $my_beanie );
etc( etc( etc() ) );
} );
Regards,
--
#Aristotle
*AUTOLOAD=*_=sub{s/(.*)::(.*)/print$2,(",$\/"," ")[defined wantarray]/e;$1};
&Just->another->Perl->hacker;
- Follow-Ups:
- Re: Timers
- From: Juan =?ISO-8859-1?Q?Jos=E9?= 'Peco' San =?ISO-8859-1?Q?Mart=EDn?=
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]