in reply to Creating a non-UI event in Perl/Tk
#!/usr/bin/perl use Tk; use Tk::ProgressBar; my $mw = new Tk::MainWindow; my $p_bar = $mw->ProgressBar( -blocks => 1, -width => 20, -length => 200, -from => 0, -to => 100, -variable => \(my $foo), )->pack(); $foo = 0; #$mw->after(0,\&main_logic); &main_logic; MainLoop; sub main_logic { $mw->repeat(10, sub { $foo = ($foo + 1) % 100 }); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Creating a non-UI event in Perl/Tk
by radiantmatrix (Parson) on Sep 23, 2004 at 14:05 UTC |