in reply to Re: Code after MainLoop; Tk
in thread Code after MainLoop; Tk
I'll have to try this later today. Crossref.pl is the next script in a series of four scripts I use to extract data from a text file, then create a spreadsheet.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Code after MainLoop; Tk
by RonW (Parson) on Jun 13, 2016 at 19:47 UTC | |
Crossref.pl is the next script in a series of four scripts Since you are automatically starting the next script, is there a reason for not combining the scripts in to a single unified application? If so, a more efficient way to start the next script would be exec 'Crossref.pl'; | [reply] [d/l] |
|
Re^3: Code after MainLoop; Tk
by PerlCowboy (Novice) on Jun 13, 2016 at 17:09 UTC | |
Thanks for the help. Using $mw->destroy worked in exiting the MainLoop. However, I have a different issue now. Somehow, after I select my items and exit the menu, all the items listed get added regardless if I check them or not. Here's the code I'm using:
| [reply] [d/l] |
by soonix (Chancellor) on Jun 13, 2016 at 21:36 UTC | |
instead be Otherwise the print is done when constructing the buttons instead of when pressing them... | [reply] [d/l] [select] |
by PerlCowboy (Novice) on Jun 15, 2016 at 17:04 UTC | |
| [reply] |
by RonW (Parson) on Jun 13, 2016 at 20:28 UTC | |
As I have recently gotten a new PC at work, I have not yet installed all of the various tools I use, so I don't have Tk handy to try your code. However... In your check_sub subroutine, at the time of this reply, all of your checks will be listed. Are the values of $check1 though $check16 what you expected? I did notice that you have:
It should be:
Also, you could use arrays in your code. Something like (not tested):
| [reply] [d/l] [select] |
by PerlCowboy (Novice) on Jun 15, 2016 at 17:09 UTC | |
This got the effect I was looking for in that only the checked items are sent accross to the spreadsheet. Thanks! | [reply] [d/l] |