Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Perl Tkx module

by nirmal1349 (Initiate)
on Oct 04, 2009 at 20:36 UTC ( #799118=perlquestion: print w/ replies, xml ) Need Help??
nirmal1349 has asked for the wisdom of the Perl Monks concerning the following question:

Hi, I am trying to open a GUI from my perl program using Perl Tkx module. When I run my program I get the error, "Can't locate object method "new" via package "MainWindow" (perhaps you forgot to load "MainWindow"?) at Apri_final.pl line 16." Can anyone please tell me whats missing?

Comment on Perl Tkx module
Re: Perl Tkx module
by zwon (Monsignor) on Oct 04, 2009 at 21:02 UTC

    Welcome to the monastery!

    Can anyone please tell me whats missing?
    The code that fails. Without the code it's hard to tell what's the problem. Can you please provide us with code snippet that causes error? Also please read How do I post a question effectively?

    Update: there's such thing as MainWindow when you're using Tk package, and that's not the same as Tkx, so perhaps you just mixed up these two packages.

Re: Perl Tkx module
by biohisham (Priest) on Oct 05, 2009 at 07:44 UTC
    I doubt that Tkx has a MainWindow object because the MainWindow object is available in Tk but not Tkx. Show us the code that generated this problem because without it we'd just be punching in the dark with regard to what possibly could have caused this as zwon has told you. Further, I'd demonstrate to you a basic difference between these two modules that can be related to your problem.

    This is how the Tkx module is invoked (run "perldoc Tkx" from your shell for more info):

    use strict; use warnings; use Tkx my $mw=Tkx::widget->new .... .... .... Tkx::MainLoop;

    And this is how you invoke the Tk module (run "perldoc Tk" from your shell for more info):

    use strict; use warnings; use Tk; my $mw=MainWindow->new(); ... ... ... MainLoop;
    Don't forget to check perldoc for each one of these modules, it can potentially give you basic information that could enable you to find where the error is yourself, if you couldn't then post that code here for us please. Have a nice Perl journey..

    Excellence is an Endeavor of Persistence. Chance Favors a Prepared Mind.
Re: Perl Tkx module
by mhinkle (Initiate) on Nov 15, 2012 at 17:27 UTC
    Hello, when I try to access the documentation referred to, I get the following:
    C:\Perl>perldoc tkx No documentation found for "tkx".
    What am I doing wrong?
      case sensitive???

        No; when I do the exact thing, I get the doc for Tkx. I think it must be that he doesn't have Tkx installed. Perhaps he has an older version of Perl?

        I reckon we are the only monastery ever to have a dungeon stuffed with 16,000 zombies.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (7)
As of 2014-07-26 07:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (175 votes), past polls