Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Tk on Win32

by atcroft (Monsignor)
on Apr 13, 2001 at 06:51 UTC ( #72286=note: print w/ replies, xml ) Need Help??


in reply to Tk on Win32

I tried running it on ActiveState build 618, and got the same results as you-nothing. So I decided to try it from the command line with -w for warnings, and got:

C:\WINDOWS\Desktop> perl -w tk1.pl
Useless use of a constant in void context at tk1.pl line 5.
Use of uninitialized value in concatenation (.) at C:/Perl/site/lib/Tk.pm line 350.
Use of uninitialized value in concatenation (.) at C:/Perl/site/lib/Tk.pm line 350.

Line 5 was the line you have as "Mainloop;" -when I changed this to "MainLoop();", it worked for me. Trying "-w" gave only:

C:\WINDOWS\Desktop> perl -w tk1.pl
Use of uninitialized value in concatenation (.) at C:/Perl/site/lib/Tk.pm line 350.
Use of uninitialized value in concatenation (.) at C:/Perl/site/lib/Tk.pm line 350.

I did get the button you intended, then.


Comment on Re: Tk on Win32
Replies are listed 'Best First'.
Re: Re: Tk on Win32
by Chmrr (Vicar) on Apr 13, 2001 at 06:55 UTC

    A side note -- those warnings of undefined values are Tk looking for a HOME environment variable. Either go in and tweak the source on those lines to make it happy, or set the HOME variable yourself.

     
    perl -e 'print "I love $^X$\"$]!$/"#$&V"+@( NO CARRIER'

      Here's my win95/winME "tweak" (i copy/pasted the whole subroutine that i munged). PS if you don't have multiple logins under win95/ME just change the else{$Home=... to $Home="C:/My Documents", on NT/2000 i'm not to sure...havn't messed with pTK on my NT box yet.

      sub TranslateFileName { local $_ = shift; unless (defined $Home) { unless ($^O eq 'MSWin32'){ $Home = $ENV{'HOME'} || ($ENV{'HOMEDRIVE'}.$ENV{'HOMEPATH'}); } else { $Home = "c:/windows/profiles/" . getlogin() . "/My Documents +"; } $Home =~ s#\\#/#g; $Home .= '/' unless $Home =~ m#/$#; } s#~/#$Home#g; # warn $_; return $_; }

      _________________
      madams@scc.net
      (__) (\/) /-------\/ / | 666 || * ||----||

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (14)
As of 2015-07-31 09:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (276 votes), past polls