Using Tk in wix XP

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • alalush
    New Member
    • Dec 2008
    • 1

    Using Tk in wix XP

    Hello All,

    I trying to write a simple perl script within win xp env.
    The script which I wrote is just to create new object as written below:

    Code:
    use Tk;
    $mw = new MainWindow;
    MainLoop;
    Repeatedly I'm getting the following error:

    bad option "windowingsyste m": must be appname, or scaling at D:/Perl/lib/Tk/Submethods.pm line 42.

    Can any one direct me what I'm doing wrong ?

    Thanks
    Ronen
  • Arepi
    New Member
    • Sep 2008
    • 62

    #2
    Hi!!

    Try this:
    Code:
    $mw=MainWindow->new();
    Maybe help...

    Comment

    • numberwhun
      Recognized Expert Moderator Specialist
      • May 2007
      • 3467

      #3
      Arepi is correct in his suggestion. You need to really follow the examples set forth in the CPAN page for TK. These pages are written by the authors and will help you get your syntax correct.

      Regards,

      Jeff

      Comment

      • KevinADC
        Recognized Expert Specialist
        • Jan 2007
        • 4092

        #4
        "new MainWindow" and "MainWindow->new()" should work the same. They are just different syntax but do the same thing.

        The code posted works for me, but I never use Tk and I have no idea what that error message means.

        Comment

        • Arepi
          New Member
          • Sep 2008
          • 62

          #5
          I guess everybody have right. The 2 syntax are really equal, but I saw such "fault" and helped the other syntax. dont know what make thats :D. Thats why I writed:"Maybe help..."

          Comment

          • Ganon11
            Recognized Expert Specialist
            • Oct 2006
            • 3651

            #6
            It may be that you installed Tk incorrectly (not sure if it came with your installation).

            Comment

            • KevinADC
              Recognized Expert Specialist
              • Jan 2007
              • 4092

              #7
              That is possible although Tk does come with activeperl. The latest versions come with Tk and Tkx and I think perl 5.10 only comes with Tkx.

              Comment

              Working...