Hi Eric,
On 21-10-2014 09:20, Erik Colson via RT wrote:
In conclusion: destroying $frame destroys $panel, but won't destroy $dialog,
because it is_not_ the child of $panel.
So, you are on your own to destroy the dialog with
$dialog->Destroy;
you can argue against this behaviour, but this is rather wxwidgets related and
probably shouldn't be altered in wxPerl, assuming it can be.
Oh, very cool answer. Nice logic. So when you do OK, or Cancel the Box
is not deleted.
I'm never quite sure when you need to delete it or not.
But when you leave scope, I guess it must be destroyed then?
Like this:
sub dosomething {
$dialog = Wx::TextEntryDialog->new( $panel, 'Please Enter Text',
'Dialog Header', "", wxOK|wxCANCEL, wxDefaultPosition );
$dialog->Show(1);
return;
}
Does it not get destroyed after "return"?
What difference does Show and ShowModal make?
Regards
Steve.