in reply to Re: MessageBox before mainloop problem
in thread MessageBox before mainloop problem

Hi,
Can you click the hello button after closing the messagebox?
me not (perl 5.6). I sent a shortened code to show you what
i was talking about. It doesn't matter what it defaults to!
It is zero to show the messagebox, otherwise it works.

Vikee
  • Comment on Re^2: MessageBox before mainloop problem

Replies are listed 'Best First'.
Re^3: MessageBox before mainloop problem
by zentara (Cardinal) on Sep 02, 2005 at 11:26 UTC
    It works in 5.8, althougth the Tk version is probably more important. I can't see why the button wouldn't work for you. I changed the code to count up with each click.
    #!/usr/bin/perl use warnings; use strict; use Tk; my $test = shift || 0; my $mw = MainWindow->new; $mw->withdraw; my $count = 0; $mw->Button( -text => "hello", -command => sub { print $count++,"\n"; } )->pack; if ( $test == 0 ) { my $answer = $mw->messageBox( -icon => 'question', -message => 'Hello World!', -title => 'My title', -type => 'Ok' ); $mw->deiconify; } else { $mw->deiconify; } MainLoop;

    I'm not really a human, but I play one on earth. flash japh