Pathologically Eclectic Rubbish Lister | |
PerlMonks |
Re^3: Perl/Tk code structureby BrowserUk (Patriarch) |
on Jan 10, 2012 at 16:15 UTC ( [id://947188]=note: print w/replies, xml ) | Need Help?? |
How complex would this job be? Not complex at all. Here is a silly script that when run with no options just gets lines from the keyboard and echos them back to the screen until the use enters '!bye':
But if you add the option to the command line C:\test>MyGui-t -GUI, it fetches lines from a Tk gui and echos the results to that gui instead. The MyGui.pm module looks like this:
And that's it. Add three lines to the top of your existing program and put the module somewhere it will be found and you are done. This is what the gui looks like doing the exact same entry sequence as shown for the non-gui session above just before hitting enter to quit the program. With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
In Section
Seekers of Perl Wisdom
|
|