Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Perl/Tk window contents disappear when obscured then revealed

by Anonymous Monk
on Jan 22, 2013 at 14:24 UTC ( #1014674=note: print w/ replies, xml ) Need Help??

Comment on Re: Perl/Tk window contents disappear when obscured then revealed
Re^2: Perl/Tk window contents disappear when obscured then revealed
by choroba (Abbot) on Jan 22, 2013 at 15:12 UTC
    Yep, this works on Linux:
    #!/usr/bin/perl use warnings; use strict; use Tk; use Proc::Background; my $mw = MainWindow->new; my $msg = $mw->Label(-text => 'Press the button once ready.')->pack +; my $button = $mw->Button(-text => 'Start', -command => \&run, )->pack; MainLoop(); sub run { my $proc = Proc::Background->new('kate'); # an editor $mw->update while $proc->alive; $mw->Label(-text => 'Finished.')->pack; $button->destroy; }
    لսႽ ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ
      You could even do timers
      our @procs; $mw->repeat( 100, \&diddleProcs ); MainLoop; sub run { ... push @procs, $proc; } sub diddleProcs { my @goners; my @alive; for ( @procs ){ if( $_->alive ){ push @alive, $_; } else { push @goners, $_; } } @procs = @alive; PackGoners(\@goners); }

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1014674]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (6)
As of 2014-12-26 01:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (163 votes), past polls