From: "Mark Dootson" <[EMAIL PROTECTED]>
How does the following work out?


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) {
   $event->Skip(1);
   $self->Destroy;
 } else {
   $event->Skip(0);
 }
}


It still doesn't work. It gives that perl error.

But if I add an exit() after $self->Destroy, it works fine.

Octavian

Reply via email to