Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Tk....What exactly IS it?

by Spidy (Chaplain)
on Sep 01, 2004 at 23:50 UTC ( #387747=perlquestion: print w/replies, xml ) Need Help??

Spidy has asked for the wisdom of the Perl Monks concerning the following question:

Can anyone explain this to me? So far all I've been able to grasp is that it has something to do with graphics.

Replies are listed 'Best First'.
Re: Tk....What exactly IS it?
by tachyon (Chancellor) on Sep 02, 2004 at 00:09 UTC

    Tk the Perl module is an interface written by Nick Ing-Simmons to Tcl/Tk. Tcl/Tk is actually two products originally developed at the University of California Berkeley, now at Sun by John Ousterhout: the Tool Command Language and the Tool Kit. They are a versatile scripting language and a graphical interface development tool, respectively.

    In brief Tk lets you build GUIs. If you build a Tk GUI with Perl it should run on just about anything Perl (and Perl Tk) runs on. By way of simple example it will almost certainly run on Win32 or Linux.

    cheers

    tachyon

      So is Tk useful for anything (I know it's useful for some things), or just that? And would it be worth it to spend money for a book on?

        PEBKAC. Tk does GUI widget stuff as noted above. If you need to do GUI widget stuff Tk is useful. Tcl (Tool control language) is a scripting language like Perl and is not Tk. Tcl can do lots of different stuff like Perl, but Tk just does widgets. The history of Tcl and Tk

        cheers

        tachyon

        I picked up the O'Reilly book "Learning Perl/Tk" out of a book bin at a local book store. It cost me all of $7.00. While I haven't actually used a GUI on any of my Perl projects, I've enjoyed going through the book and learning about Perl/Tk. I usually pull it out when I'm feeling like I need a change in perspective. It's just different enough from what I'm usually working on that it provides me with some amusement.

        While I wouldn't recommend spending big bucks on a book about a technique you may never need, if you can pick up something inexpensive, it's worth the investment. For myself, if in the future I find I need a GUI for something, I'll be partly prepared to tackle that.

Re: Tk....What exactly IS it?
by Aristotle (Chancellor) on Sep 02, 2004 at 00:05 UTC

    It's a class library implementing a widget toolkit.

    Makeshifts last the longest.

Re: Tk....What exactly IS it?
by zentara (Archbishop) on Sep 02, 2004 at 13:05 UTC
    Besides what others have said about GUI creation, Tk is a different kind of programming, involving an "event loop". You need to think abit differently when programming in event loops. But after you get used to it, there is alot more you can do, like setup background timers, multi-tasking, etc.

    POE is another example of "event loop" programming, and you can even use Tk to run event loops without the GUI, by withdrawing the mainwindow.


    I'm not really a human, but I play one on earth. flash japh

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://387747]
Approved by Aristotle
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (2)
As of 2022-06-28 05:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My most frequent journeys are powered by:









    Results (90 votes). Check out past polls.

    Notices?