Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: User Interface

by liverpole (Monsignor)
on Sep 14, 2009 at 21:56 UTC ( [id://795221]=note: print w/replies, xml ) Need Help??


in reply to User Interface

Hi kingjamesid,

Try using ppm to install Tk:

C:\Documents and Settings\myself> ppm install Tk

If that's successful, you'll get DialogBox for free (but you'll still have to use Tk::DialogBox in your program).

For example:

#!/usr/bin/perl -w use strict; use warnings; use Tk; use Tk::DialogBox; my $mw = new MainWindow(); my $a_btn = [ "Of course!", "No way" ]; my $dbox = $mw->DialogBox(-buttons => $a_btn); my $lbl = $dbox->add("Label", -text => "Isn't this a great program?" +); $lbl->pack; $dbox->Show(); # Do something with the answer, etc. ... MainLoop;

s''(q.S:$/9=(T1';s;(..)(..);$..=substr+crypt($1,$2),2,3;eg;print$..$/

Replies are listed 'Best First'.
Re^2: User Interface
by kingjamesid (Acolyte) on Sep 14, 2009 at 23:17 UTC
    I choose ?ppm install Tk ...and I get this error.....
    Downloading ActiveState Package Repository packlist...failed 500 Can't connect t o ppm4.activestate.com:80 (Bad hostname 'ppm4.activestate.com') ppm install failed: Can't find any package that provides Tk
      That sounds a lot like a transient problem on the net.

      But, OTOH, I have no idea what the question mark before your ppm command signifies.

      Regardless, this works for 5.8.8 and ppm 4.0:

      ppm install TK
        Ok. Installed Tk-804.028_501.tar, extracted it. It contains a BUNCH of files. Should this go under C:\perl\*.* or a separate dir for Tk-804.028_501 and put this path in path? Any recommendations? Thanks
      Ok. Installed Tk-804.028_501.tar, extracted it. It contains a BUNCH of files. Should this go under C:\perl\*.* or a separate dir for Tk-804.028_501 and put this path in path? Any recommendations? Thanks
        Ok. Installed Tk-804.028_501.tar, extracted it.

        Where did you get it from ? If it's from CPAN, then you've probably grabbed the Tk source - which would need to be compiled. Probably easier at this stage to persevere with ppm.
        While connected to the internet, try this command:
        ppm install http://www.bribes.org/perl/ppm/Tk.ppd
        or, for the latest developer release:
        ppm install http://www.bribes.org/perl/ppm/Tk_.ppd
        If those commands fail, see ActivePerl-faq2.html in your perl/html/faq folder. (See especially the section "PPM, Proxies and Firewalls" near the end of that document.)

        If you really do want to build Tk from source, then first run ppm install MinGW to give you a compiler and make utility. Then you should be ready to build and install Tk from source.

        Cheers,
        Rob
        syphilis has some great advice. I would add that since you are on ActiveState 5.10, there is now a GUI on ppm. Just type "ppm" at the command prompt without any command (like install), the GUI will start. Find Tk and click on it to mark it for installation, then "run selected actions". Anyway I recommend this GUI interface as being easy to use. Of course the previous command line I/F still works.

        Everything you need is on the default repository, in the future if you need other repositories (like bribes), go into preferences and you can add repositories, example bribes is in a convenient click item. But you again all that you need is in the default repository. ActiveState has a special module format, .ppd. Installing a module from CPAN can get more complicated than the above.

        I can't tell if you are having proxy or firewall trouble or not. syphilis has the right pointer for that.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (5)
As of 2024-04-19 09:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found