Is there a debugger specifically for Perl/Tk?
comp.lang.perl.tk FAQNot for the latest version - but the -w switch and use strict; are always helpful with debugging as they provide informative error messages. You can, of course, run under the standard perl debugger using the -d switch like so: perl -d myscript But it is recommended that you set you breakpoints carefully since just the calls to ManWindow->new require many steps. Older information): Gurusamy Sarathy <gsar@engin.umich.
What is Perl/Tk?
comp.lang.perl.tk FAQPerl/Tk (also known as pTk or ptk) is a collection of modules and code that attempts to wed the easily configured Tk 8 widget toolkit to the powerful lexigraphic, dynamic memory, I/O, and object-oriented capabilities of Perl 5. In other words, it is an interpreted scripting language for making widgets and programs with Graphical User Interfaces (GUI). (Examples of widget programs [not necessarily written in Perl/Tk] include xterm, xclock, most web-browsers, etc.
How do I write scripts in Perl/Tk?
comp.lang.perl.tk FAQStart your script as you would any perl script (e.g. #!/usr/bin/perl, #!/usr/local/bin/perl, #!/opt/bin/perl, [built static? then #!/usr/bin/tkperl], whatever, see the perlrun(1) man page for more information).
How do I call Tcl code from Perl/Tk?
comp.lang.perl.tk FAQAssuming that you have a pressing need to call Tcl from Perl/Tk then one "official way" to so would be via the ->send() and the ->Receive() methods. It is also worth noting that you can still have access to a complete Tcl script from perl via the perl system, or '' (backtick), or even exec mechanisms. Just be careful with I/O waits and return values if you try one of these approaches. Further suggestions may be found in the various perlipc files at: ftp://ftp.perl.
Is there something equivalent to wish in Perl/Tk?
comp.lang.perl.tk FAQThe idea of wish is that you read from <STDIN> and evaluate each statement. The standard way to do this in Perl/Tk is to use the tkpsh script that comes in your Perl/Tk build directory. Another elegant way to get wish like behavior in Perl/Tk is to use rmt which you can find in perl5/Tk/demos in your Perl/Tk distribution. When you run rmt you already have Tk.pm set up for you so you can start typing things like $mmm = new MainWindow; etc. at the rmt: prompt.
Is there a GUI builder in Perl/Tk?
comp.lang.perl.tk FAQWork has reputedly (January 1996) started on porting a Tcl/Tk GUI builder known as SpecTcl for use with Perl/Tk. For the Tcl/Tk SpecTcl kit see: ftp://ftp.sunlabs.com/pub/tcl/SpecTcl-*.tar.[gz|Z] and address questions about SpecTcl to <spectcl@tcl.eng.sun.com>. In <news:ANDREAS.96Mar24234521@marvin.berlin.de> Andreas Koschinsky <marvin@logware.
How do I compile Perl/Tk scripts?
comp.lang.perl.tk FAQbrings a new and exciting answer to this question: PAR, a "Cross-Platform Packaging and Deployment tool", originally developed by Autrijus Tang. Before PAR, the only public support for Perl/Tk "compilation" was in the Dr.
What are some of the primary differences between Tcl/Tk and Perl/Tk?
comp.lang.perl.tk FAQConsidering that both interpreters/(compiler) for Tcl and Perl were written in C for original use on Unix computers it is not surprising that there are some similarities between the two languages. Nevertheless, there are a large number of differences between the Tcl language and the Perl language. One thing to keep in mind is that to build, install, and use Perl/Tk one does not need to have Tcl/Tk on hand at all. Perl/Tk is completely independent of Tcl/Tk.
Is there a Tcl/Tk to Perl/Tk translator?
comp.lang.perl.tk FAQNick Ing-Simmons has written a (rather lengthy) tcl2perl script. It is distributed with the Perl/Tk build kit. Please handle carefully! (translation: do not expect it to translate arbitrary tcl code accurately nor even into the most efficient Perl/Tk equivalent. Do go over the converted script with care - and do not forget -w and use strict;.) Thanks Nick :-)
Do I need Tcl/Tk in order to build Perl/Tk?
comp.lang.perl.tk FAQLonger answer: In order to build Perl/Tk from source code you do need a recent version of perl, the Perl/Tk source code kit, a graphical user interface library such as Xlib, Presentation Manager, or Win32; a C or C++ compiler, and a make utility. In some rare cases Perl/Tk binaries are distributed for some platforms but that is more the exception than a general rule (see below). If you will be attempting to port Perl/Tk to your platfrom then you might want to consult the document at: http://w4.
What widget types are available under Perl/Tk?
comp.lang.perl.tk FAQInputOnly There are (a lot of) other [compound|composite|constructs] available too. You can also synthesize new widgets out of these primitives using perl5's object-oriented multiple inheritance features. You can even build entirely new widget primitives from raw C (XS) code then use and re-use that. (Perl 5 is extremely configurable.) A good introduction to the primitives and how they may be used in conjunction with each other may be found in the widget demo script.
Is there a way to find out what is in my Perl/Tk "PATH"?
comp.lang.perl.tk FAQPresuming this question is asking for a little more than the answer you get when you type: ls perl5/lib/Tk/*.pm there are ways to find out what gets EXPORTED by Tk.pm. Use a script like: #!/usr/bin/perl use Tk; require 'dumpvar.pl'; dumpvar('Tk'); or more succintly at the shell command prompt: perl -e 'use Tk; require "dumpvar.pl"; dumpvar("Tk");' The advantage of using dumpvar over ls is that it gives you a brief summary of all the arguments your widgets want.
How do I determine the version of Perl/Tk that I am running?
comp.lang.perl.tk FAQWith an up to date perl installation one may query the local perl setup and all extensions via the command: perldoc perllocal For the Tk extension: version numbering has changed recently and determining the version of Perl/Tk that you are running now depends on what version you are running: Tk-b10 (and higher) has changed to $Tk::VERSION (rather than the older "$Tk:Version") to be consistent with other packages.
Are there any international font packages for Perl/Tk?
comp.lang.perl.tk FAQIn principle you may specify the -font configuration option on all your Button, Entry, Label, Message, etc. widgets. In addition to the Unix programs xfontsel and xlsfonts you may find xset useful for determining and/or specifying fonts - especially international ones. KOBAYASI Hiroaki <kobayasi@sowa.is.uec.ac.jp> has converted the Tcl/Tk "japanization" by <nisinaka@sra.co.jp> so that it may be used with Perl/Tk.
Are there any major applications written in Perl/Tk?
comp.lang.perl.tk FAQYour very own Perl/Tk distibution: The following programs may be found in your own Tk#/ directory (you already have these if you have the Tk extension to perl)*: program description pfm perl file manager - cute iconic front to emacs ptknews a GUI perl newsreader - a work in progress. tkpsh Perl/Tk equivalent of the Tcl/Tk wish shell. toyedit a Text widget editor.
