By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,660 Members | 1,230 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,660 IT Pros & Developers. It's quick & easy.

Using Tk in wix XP

P: 1
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:

Expand|Select|Wrap|Line Numbers
  1. use Tk;
  2. $mw = new MainWindow;
  3. MainLoop;
  4.  
Repeatedly I'm getting the following error:

bad option "windowingsystem": 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
Dec 7 '08 #1
Share this Question
Share on Google+
6 Replies


P: 62
Hi!!

Try this:
Expand|Select|Wrap|Line Numbers
  1. $mw=MainWindow->new();
Maybe help...
Dec 7 '08 #2

numberwhun
Expert Mod 2.5K+
P: 3,503
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
Dec 7 '08 #3

KevinADC
Expert 2.5K+
P: 4,059
"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.
Dec 7 '08 #4

P: 62
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..."
Dec 7 '08 #5

Ganon11
Expert 2.5K+
P: 3,652
It may be that you installed Tk incorrectly (not sure if it came with your installation).
Dec 8 '08 #6

KevinADC
Expert 2.5K+
P: 4,059
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.
Dec 8 '08 #7

Post your reply

Sign in to post your reply or Sign up for a free account.