ankit.tayal560 has asked for the wisdom of the Perl Monks concerning the following question:
use strict; use Tk; my $mw = MainWindow->new; $mw->geometry("500x200"); $mw->title("Hello User"); $mw->Label(-text => 'Hello user, please Load the required fileand then + press ok')->pack(); $mw->Button(-text => "OK", -command =>sub{exit})->pack(); MainLoop;
I've written this code to generate a dialog box for a user to instruct him to load the required file manually. Now I want to save the file as well(through script not manual) but as soon as user will press "OK" in the dialog box my script ends because of the "exit" used in perl/Tk. I am new to this module so I don't know how to use it effectively. monks help me out in this please?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How to create a dialog box with perl/Tk that does not end your script?
by tybalt89 (Monsignor) on Oct 07, 2016 at 07:03 UTC | |
by ankit.tayal560 (Beadle) on Oct 07, 2016 at 09:59 UTC | |
|
Re: How to create a dialog box with perl/Tk that does not end your script?
by kcott (Archbishop) on Oct 07, 2016 at 08:41 UTC | |
|
Re: How to create a dialog box with perl/Tk that does not end your script?
by Anonymous Monk on Oct 07, 2016 at 04:45 UTC |