Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
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 (Canon) 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 contemplating the Monastery: (8)
As of 2015-07-03 02:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (47 votes), past polls