Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Which works, but I'm hoping there's a way that's slightly more kosher. (I know threading would help, but restructuring the code to that extent is off in the future)use strict; use warnings; use Tk; my $top = new MainWindow; $top->Button( -text => 'Start LongTime.exe', -command => \&longtime ) ->pack; my $diag = $top->Dialog( -text => 'Working...', -buttons => [] ); MainLoop; sub longtime { $diag->after( 100, sub { system('longtime.exe'); $diag->{selected_button} = 1 } ); $diag->Show(); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Tk Dialog Manipulation
by cmv (Chaplain) on Oct 26, 2007 at 01:30 UTC | |
|
Re: Tk Dialog Manipulation
by zentara (Cardinal) on Oct 26, 2007 at 13:16 UTC |