Beefy Boxes and Bandwidth Generously Provided by pair Networks RobOMonk
"be consistent"
 
PerlMonks  

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

by choroba (Abbot)
on Jan 22, 2013 at 15:12 UTC ( #1014690=note: print w/ replies, xml ) Need Help??


in reply to Re: Perl/Tk window contents disappear when obscured then revealed
in thread Perl/Tk window contents disappear when obscured then revealed

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; }
لսႽ ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ


Comment on Re^2: Perl/Tk window contents disappear when obscured then revealed
Download Code
Re^3: Perl/Tk window contents disappear when obscured then revealed
by Anonymous Monk on Jan 22, 2013 at 15:23 UTC
    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://1014690]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (11)
As of 2014-04-17 11:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (445 votes), past polls