Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

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

by choroba (Canon)
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 musing on the Monastery: (9)
As of 2015-07-06 21:54 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 (83 votes), past polls