ljsmith91 has asked for the wisdom of the Perl Monks concerning the following question:
Is there a valid way of exiting the menu and continuing the script ? "$main => destroy;" fails to do so. Thanks. GrandFather, Yes...menu/ dialogbox...not sure of the difference. I attempted to incorporate your code but I could not get it to work. I just want to be able to Exit the Menu/ dialog when the Submit Action button is clicked. I have no idea why I cannot do this in a separate subroutine. Is the fact that I am not using the DialogBox the reason? I present a menu to the user waiting for specific text, radio buttons etc to be interfaced with, when completed, I want to gather that info and exit out of the dialog/ menu and then continue on the the script. I tried to add you code(subroutine in) and i thought I would get another menu(dialogbox) but for whatever reason my original menu just stays up after Submit is issued. I know I am just a rookie...seems like this should be simple but I am not getting it. thanks for any help/ guidance.my $main = MainWindow->new(); $Action_Submit = $main->Button(-text => 'Submit', -command => [\&g +et_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; ...{below continue with the script] }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How do you exit PERL TK menu without exiting the script too ?
by GrandFather (Saint) on Sep 19, 2006 at 19:07 UTC | |
|
Re: How do you exit PERL TK menu without exiting the script too ?
by rcseege (Pilgrim) on Sep 20, 2006 at 00:46 UTC | |
by ljsmith91 (Initiate) on Sep 20, 2006 at 00:52 UTC | |
by GrandFather (Saint) on Sep 20, 2006 at 01:14 UTC | |
by rcseege (Pilgrim) on Sep 20, 2006 at 03:06 UTC |