Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Re: Re: Re: Re: Re: Re: How to interpret this Perl Tk.pm error?

by Chmrr (Vicar)
on Dec 14, 2001 at 17:01 UTC ( [id://131951]=note: print w/replies, xml ) Need Help??


in reply to Re: Re: Re: Re: Re: Re: How to interpret this Perl Tk.pm error?
in thread How to interpret this Perl Tk.pm error?

Tk isn't XWindows-specific, and the only reason 'rc files' were brought up is because people were under the impression that you were attempting to do something quite different than what you though you were asking. Here's the skinny on Tk:

Tk is a tool that allows you to make applications with graphical interfaces. Note that "Perl application" need not equal "CGI program on a webserver." In the case of Tk, it makes local, window-based applications. Perhaps a tip-off that it can't be used with websites is that Tk is never mentioned anywhere close to 'CGI,' 'webserver,' 'webpage,' 'http,' or 'online.'

Let's take a real-world example. I wrote a bunch of command-line tools to deal with putting together and editing large numbers of data files for a complicated piece of modelling software. On their own, they do exactly what they need to do; someone can pop up a DOS window or a UNIX prompt and run the programs, and they work fine. But many Windows users are used to having the kind of graphical interface that you're talking about -- so I put together a Tk version of the programs. Now people can double-click the icon, and get a nice set of windows that allow them to point and click to change all the settings, instead of the "clumsy" command line tools.

As a general aside, you can't use server-side tools to control how the client-side interface works -- as the names imply, they're seperate beasts. The three alternatives that I mentioned all are client-side -- that's what gives them the ability and power to muck around with what the viewer sees and does.

Your last question is about how to play around with Tk. Unfortunatly, you can't run the Tk script on a remote Unix computer and have it show up on a Windows computer. If your local machine were Unix-based, you might have been able to finesse it (that's what all the talk about the DISPLAY variable was) You're probably much easier off running it locally, though. Install a Windows-based Perl, like ActivePerl, and install the Tk package ('ppm install Tk' from a command prompt). Running the 'widget' program from a command prompt should show you some good examples of what Tk can do.

perl -pe '"I lo*`+$^X$\"$]!$/"=~m%(.*)%s;$_=$1;y^`+*^e v^#$&V"+@( NO CARRIER'

  • Comment on Re: Re: Re: Re: Re: Re: Re: How to interpret this Perl Tk.pm error?

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (3)
As of 2024-04-26 04:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found