basic tcl installation problem
basic tcl installation problem
(OP)
Hello there,
I am new to tcl and simply trying to install a complete program (this one: http://www.softdoc.de/woz/). I work on Windows 10 and have currently installed Tcl 8.5.18.0 - x86. The Woz-program (woz.tcl) used to run a few months ago and now I am puzzled to see that it does not do so anymore.
When starting woz.tcl from the command line, at least I get an error: "This program requires wish!". The reason why I am puzzled is that I do have a wish.exe and wish85.exe in C:\Tcl\bin (this path has also been added to the environment variables). When I looked into the source code of woz.tcl, I realized, that I can't quite figure out all of the syntax:
# check tk availability
if {[info commands button]==""} {
puts "FATAL ERROR:\n\nThis program requires wish!"
exit
}
So maybe someone can help me
A) by explaining what "[info commands button]" means on a syntactic level (it seems to be checking if wish exists, but I don't know where exactly it is looking)
B) by giving me a hint what wish-files I should have other than wish.exe and where they should be placed.
Thank you so much!
Best, Ines
I am new to tcl and simply trying to install a complete program (this one: http://www.softdoc.de/woz/). I work on Windows 10 and have currently installed Tcl 8.5.18.0 - x86. The Woz-program (woz.tcl) used to run a few months ago and now I am puzzled to see that it does not do so anymore.
When starting woz.tcl from the command line, at least I get an error: "This program requires wish!". The reason why I am puzzled is that I do have a wish.exe and wish85.exe in C:\Tcl\bin (this path has also been added to the environment variables). When I looked into the source code of woz.tcl, I realized, that I can't quite figure out all of the syntax:
# check tk availability
if {[info commands button]==""} {
puts "FATAL ERROR:\n\nThis program requires wish!"
exit
}
So maybe someone can help me
A) by explaining what "[info commands button]" means on a syntactic level (it seems to be checking if wish exists, but I don't know where exactly it is looking)
B) by giving me a hint what wish-files I should have other than wish.exe and where they should be placed.
Thank you so much!
Best, Ines
RE: basic tcl installation problem
RE: basic tcl installation problem
IMO, the simplest solution would be to reinstall TCL on your Windows - it takes you only some minutes.
First uninstall old TCL and install new. Anyway, the version 8.5 is already old. The proper version for windows is ActiveTCL.
RE: basic tcl installation problem
I need a 32bit version because I will later install tcom which did not work on 64bit. So I have the choice between 8.6.6.8607 and 8.5.18.0. It turns out that 8.6.6.8607 does not come with teacup (which I need for downloading packets like tcom).
So after a lot of installing and uninstalling several different versions I am left with 8.5.18.0. that "should" have what I need but the problem described in my question persists. Even the newest version of Tcl 8.6.7.0 raises the problem.
I added the paths C:\Tcl\bin AND C:\ActiveTcl\bin (different path for the other version) both to my user variables and my system variables. This path is also where wish.exe is located so TCL and wish "should" be traceable.
What about the "[info commands button]" - any ideas where that piece of code looks to get a value?
Thnx
RE: basic tcl installation problem
Thanks for your effort.
RE: basic tcl installation problem
info commands <pattern> return list of command specified by the pattern
In your case the command button is not found so the list is empty and you get the error message.
It could have several causes:
1. I don't understand why you have 2 paths for tcl, i.e. C:\Tcl\bin and C:\ActiveTcl\bin ?
Maybe you mix 2 versions, one installed properly and other not.
I have ActiveTcl installed by default in the C:\ActiveTcl directory and have in the PATH only C:\ActiveTcl\bin
2. It seems that your script runs in tclsh and not in wish:
When I take this piece of code
inesw.tcl
CODE
CODE
But when I run it on command line in wish
CODE
When I simply double click on the script inesw.tcl, it will be automatically opened with wish and the button appears (like on the screenshot but without command line window).
It seems that something gone wrong with your Tcl installation on Windows ...
Didn't you changed file association in your windows, so that the files with the extension *.tcl should be opened by tclsh ?
RE: basic tcl installation problem
RE: basic tcl installation problem
RE: basic tcl installation problem
https://community.activestate.com/node/21460
RE: basic tcl installation problem
On the older machine I found Win32 version and teacup is present in the Tcl\bin directory and works.
On the newer machine I found x64 version and teacup is not available.
So really, who wants to use teacup needs Win32 version.
RE: basic tcl installation problem
I have been switching back and forth between different versions (one at a time). So I added the path for each version and left it there even after uninstalling that version.
Yes, I set *.tcl to be opened by tclsh by default. This is still the case now (after solving the wish-error). I will have to meditate on this a little more.
Thanks for your help. :)