Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: RFC: Learning Perl/Tk

by thundergnat (Deacon)
on Aug 10, 2011 at 14:39 UTC ( #919670=note: print w/ replies, xml ) Need Help??


in reply to RFC: Learning Perl/Tk

my $button = $mw -> Button(-text => "Quit", -command => sub { exit }) -> pack();

Arrgh. Don't use a bare exit; in a Tk program, use Tk::exit; It won't matter in this little snippet, but for a larger more complex GUI with multiple windows/widgets Tk::exit; will do a controlled cleanup and shutdown and avoid all kinds of warnings about unreleased resources.

It might be worth mentioning the Widgets demo program included with Tk to help explain some of the widgets.


Comment on Re: RFC: Learning Perl/Tk
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://919670]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (6)
As of 2014-07-29 04:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (211 votes), past polls