in reply to Perl Tk, GUI / Window Manager freezes/blocks when creating new windows, dialogues or balloons

The code you posted doesn't reproduce the behavior you are describing: It'd be prudent to replicate the same problem you're facing in a summary code and make the code as much self-spoken as possible to receive better responses and direction...

Best of Luck vertigomagic..


Excellence is an Endeavor of Persistence. Chance Favors a Prepared Mind.
  • Comment on Re: Perl Tk, GUI / Window Manager freezes/blocks when creating new windows, dialogues or balloons
  • Download Code

Replies are listed 'Best First'.
Re^2: Perl Tk, GUI / Window Manager freezes/blocks when creating new windows, dialogues or balloons
by vertigomagic (Initiate) on Dec 07, 2009 at 09:52 UTC
    Oooh, sorry! The first problem is: The original code is much too big and copyright-sensitive aswell, so i just extracted some of the routines which cause the problems.

    I extracted the following test example, which i am pretty sure would cause the same errors. The script either freezes, when the cursor rests more than 200ms over the first test button when the ballloon help would normally show up, or when you hit the second button and the getOpenFile-dialog normally would open:
    #!/usr/bin/perl -w use strict; use warnings; use Tk; use Tk::Balloon; use Tk::Dialog; use Tk::DialogBox; #-------------------------------------------- my $mw = MainWindow->new( ); #-------------------------------------------- my $balloonbutt = $mw->Button( -text => 'Test Balloon MouseOver', ) ->grid( -column => 10, -row => 10, -padx => 10, -pady => 10, ); my $ball = $balloonbutt->Balloon( -state => "balloon", -cancelcommand => sub { return 1 }, ); $ball->attach( $balloonbutt, -balloonposition => 'mouse', -msg => "Balloon Test", -cancelcommand => sub { return 1 }, -initwait => 200, ); #-------------------------------------------- $mw->Button( -text => 'Browse', -command => sub { my $types = [ [ 'Modellfiles' , ' +*.fif *.nas *.bdf' ], [ 'All Files' , ' +*' ] ]; my $file = $mw->getOpenFile( -filetypes => $ty +pes, -title => "Te +st getOpenFile", ); }, ) ->grid( -column => 20, -row => 10, -padx => 10, -pady => 10, ); #-------------------------------------------- MainLoop();
    The second, major problem: The error only occurs on the environment of my customer. And i don't get too many chances, to try out this and that all the time on this system. I am expectet to provide my customer some code, which runs ... ;-) I know, stupid me selling scripts, not beeing evaluated on the environment which they're running on later ... ;-)
    On my environment, the test script above runs absolutely normal without any problems.

    Markus.