I have no doc and I'm struggling to find how its done on any website. I just want to exit out of the a perl/tk menu that I create in a separate subroutine. The EXIT Action Button works to exit the menu but the SUBMIT Action button does not. I would like to exit the menu at the end of the get_input subroutine. Here's the excerpt from the script:
Is there a valid way of exiting the menu ? "$main => destroy;" fails to do so. Thanks.
Code:
my $main = MainWindow->new();
$Action_Submit = $main->Button(-text => 'Submit', -command => [\&get_input ])->place(-x => 700, -y => 45);
$Action_Exit = $main->Button(-text => 'Exit', -command => [$main => 'destroy'])->place(-x => 700, -y => 115);
# This menu has several radio and action buttons. Once
# filled out, I want to first pull all of the data input
# into the menu and place them into variables....then exit. # However, this does not Exit the menu as i would think it
# should. Instead the menu stays active until we actually
# exit the script.
sub get_input {
$ftp_loginid = $LoginID->get;
$ftp_pw = $LoginPW->get;
$ftp_localdir = $LocalDIR->get;
$main => destroy;
}
Is there a valid way of exiting the menu ? "$main => destroy;" fails to do so. Thanks.