vertigomagic has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/bin/perl -w use strict; use warnings; use diagnostics; use Tk; use Tk::Balloon; use Tk::Dialog; use Tk::DialogBox; use Tk::FileSelect; use Tk::Pane; use Tk::BrowseEntry; use Tk::ProgressBar; use Tk::NoteBook; #---------------------- my $version = "1.1.0"; sub init { $initdone = 0; $mw->Walk( sub { $_[0]->destroy } ) if ( Exists( $mw ) ); $mw = MainWindow->new( -background => "#e6e6e6", -title => "ParaWell v$version +", ) if ( not Exists( $mw ) ); #----------------------------------------- sub progress { $frameprogress->MapWindow if ( $_[0] < 1 ); $percents = sprintf( "%d%%", $_[0] * 100 ); $percent = $_[0] * 100; $progressbar->idletasks; $frameprogress->UnmapWindow if ( $_[0] == 1 ); return if ( $_[1] eq $progwhat ); $progwhat = " "; $progwhatlab->idletasks; $progwhat = ( $frameprogress->ismapped ) ? $_[1] : ""; } #---------------------------------- sub addball { return if ( not Exists( $_[0] ) ); my $ball = $_[0]->Balloon( -state => "balloon", -foreground => "#000000", -background => "#ffffaa", -cancelcommand => sub { return 1 }, ); $ball->attach( $_[0], -balloonposition => 'mouse', -msg => ( join "\n", $_[1] +), -cancelcommand => sub { return 1 }, -initwait => 200, ); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Perl Tk, GUI / Window Manager freezes/blocks when creating new windows, dialogues or balloons
by zentara (Cardinal) on Dec 04, 2009 at 13:25 UTC | |
|
Re: Perl Tk, GUI / Window Manager freezes/blocks when creating new windows, dialogues or balloons
by biohisham (Priest) on Dec 04, 2009 at 11:27 UTC | |
by vertigomagic (Initiate) on Dec 07, 2009 at 09:52 UTC |