Your skill will accomplish
what the force of many cannot
Perl/Tk : Trouble with commands and Checkbuttonsby Petras (Friar)
|on Sep 16, 2005 at 04:00 UTC||Need Help??|
Petras has asked for the
wisdom of the Perl Monks concerning the following question:
I've finally finished the Llama and have started on the Emu. I'm trying to make a simple Perl/Tk program that displays a grid of Checkbuttons. I want to call a subroutine when the buttons are checked/unchecked (same sub eitherway). Here's the code that works (works but without calling the sub):
But this doesn't do what I expect it to:
From the text it seems that when I check/uncheck a Checkbutton that the shell window should print the grid coordinates. Instead, when the script is run the 25 sets of coordinates go straight to the window and nothing happens when the Checkbuttons are checked/unchecked. What am I missing?
For a free bonus, if more-experienced-posters-than-I want to clue me in on the appropriate use of READMORE I'd be willing to learn! cog already instructed me on signatures ;)
UPDATE:pg has the code for what I was looking to do. The other blessed and beautiful monks who replied were all right, their answers match what the Emu says. I was wanting to be able to call a sub through -command and discovered how last night reading the source code for some of the examples in widget.exe. This (thanks, pg and widget.exe authors) is what does what I wanted to do:
So, thanks everyone, for your part in my learning experience.
Don't worry about people stealing your ideas. If your ideas are any good, you'll have to ram them down people's throats.