From: Zeke L. <ove...@ks...> - 2002-01-28 21:28:14
|
>I would try I a wxMessageDialog: >my $dialog = Wx::MessageDialog($this, 'message', 'Exiting Worms GUI', > wxOK | wxCANCEL, wxDefaultPosition); >The ShowModal() you called should work fine then. Ok, I did that but I get errors, here's my code: # these are some constants used by Wx::MessageBox use Wx qw(:everything); # called when the user selects the 'Exit' menu item sub OnQuit { my( $this, $event ) = @_; my $dialog = Wx::MessageDialog($this, 'message', 'Exiting Worms GUI', wxOK | wxCANCEL, wxDefaultPosition); if( $dialog->ShowModal == wxID_CANCEL ) { $dialog->Destroy; } else { $this->Close( 1 ); } } and then Perl Crashes, and I get this message in the console: Error while autoloading 'Wx::MessageDialog' at test3.pl line 71 Line 71 is the my $dialog line. All help so far is appreciated greatly. |