Hi,
I made an app with a menu that has an "Exit" item which if clicked, it is
handled by the following event handler:
sub OnExit {
my ($self, $event) = @_;
my $result = Wx::MessageBox(t("Are you sure you want to close the
application?"), t("Exit"), wxYES|wxNO);
if ($result == wxYES) {
$self->Destroy;
}
}
If I click the "no" button, all works fine, but if I choose yes to close the
application, it appears a perl interpreter error window.
It is strange, because if I don't open that MessageBox, it doesn't appear
that error, although the same code is executed.
I've seen that even if I open a simple message box in the event handler
subroutine and I just print a message without checking for a return code, it
still gives that error.
The following handler works fine:
sub OnExit {
my ($self, $event) = @_;
$self->Destroy;
}
Does it happen for you also or I need to re-install perl or WxPerl?
Thank you.
Octavian