From: Mattia B. <mb...@ds...> - 2002-01-29 19:54:48
|
> Hi! > > > my $dialog = Wx::MessageDialog($this, 'message', 'Exiting Worms GUI', wxOK > > | wxCANCEL, wxDefaultPosition); > > [...] > > and then Perl Crashes, and I get this message in the console: > > Error while autoloading 'Wx::MessageDialog' at test3.pl line 71 > > Er, I made a mistake. The Dialog should (of course) be initialized calling > the constructor, so that's actually: > > my $dialog = Wx::MessageDialog($this, 'message', 'Exiting Worms GUI', > wxOK | wxCANCEL, wxDefaultPosition); my $dialog = Wx::MessageDialog->new( .... ); ^^^^^ > ...and then ShowModal() should be called. > > I tried myself the code and, oddly enough, it only works under MSl Windoze. I'm really surprised it works at all... > If I use Linux, the program exits with a segmentation fault when ShowModal() > is called. The reported error is: > > ----- > Can't locate object method "ShowModal" via package "Wx::GenericMessageDialog" > (perhaps you forgot to load "Wx::GenericMessageDialog"?) > ----- Regards Mattia |