Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help getting tcl 7 code to run on tcl 8

Status
Not open for further replies.

manfriday29

IS-IT--Management
Jan 16, 2009
2
US
Hi,

We have a fairly complicated custom application that was written many years ago in TCL 7. It is currently running on an ancient Solaris box.

I have been asked to find a way to get it running on either a newer intel-based solaris box or a linux box.

I appear to be running into issues with namespaces. From what I have gathered TCL 7 did not support them, so they were not used in this app.

What I am hoping is that there is some magic command I can stick in a file somewhere that will make this old tcl 7 code run on a box with tcl 8.

Is there any such magic command? Or do I need to start the grueling task of learning tcl and porting the app over to tcl 8?
 
There is probably not such a magic command, to allow running the older version with actual language interpreter.

But that's the general problem of scripting languages that don't care about backward compatibility. I have similar problem with Python apps written in version 2.x. I have to port them to 3.x in the near future, because 3.x is the actual language version, but it is not backward compatible with 2.x
:)

But I don't understand your problem: How can you have issues with namespaces in your Tcl7 app, when Tcl7 don't support them.

Have you already tried to run your Tcl7 app with Tcl8 ? When yes, then what errors you got?
 
I have not run into any backward compatibility issues with any versions of Tcl. What specific problems are you seeing? What statements are not executing properly?

_________________
Bob Rashkin
 
Thanks for the responses, guys.

As I may have mentioned, I don't really know anything about TCL. Im sorta learning this 'on the fly', so maybe I have some fundamental misunderstanding about the nature of my own issue here.

When I run the application under TCL 7.6 and TK 3.4 (both from circa 1997 I think) the app launches..
However, when I try launching it from current releases is TCL/TK I get the following error message:

Application initialization failed: invalid command name "tcl_findLibrary"
Error in startup script: can't create procedure "tixSetFontset::14Point": unknown namespace
while executing
"proc tixSetFontset::14Point {} {

global tixOption

set tixOption(font) -*-helvetica-medium-r-normal-*-14-*-*-*-*-*-*-*
set tixOpt..."
(file "/DCS_network/current/lib/tix/schemes/Fonsets.tcl" line 1)
invoked from within
"source /DCS_network/current/lib/tix/schemes/Fonsets.tcl"
("uplevel" body line 1)
invoked from within
"uplevel #0 $auto_index($cmd)"
invoked from within
"if [info exists auto_index($cmd)] {
uplevel #0 $auto_index($cmd)
if {[info commands $cmd] != ""} {
return 1
}
}"
(procedure "auto_load" line 52)
invoked from within
"auto_load tixSetFontset::$option(-fontset)"
(procedure "tixInit" line 46)
invoked from within
"tixInit -libdir /DCS_network/current/lib/tix -binding Motif"
("uplevel" body line 1)
invoked from within
"uplevel $args"
invoked from within
"if $msg {
return [uplevel $args]
}"
invoked from within
"if ![info exists auto_noload] {
#
# Make sure we're not trying to load the same proc twice.
#
if [info exists unknown_pending($name)] {
unset..."
(procedure "::unknown" line 5)
invoked from within
"tixInit -libdir $env(DCS_DIR)/lib/tix -binding Motif"
(file "/DCS_network/current/bin/dcs.tk" line 13)


So I dug through that and figured it had to do with the fact that nothing in the code seemed to be making use of a namespace. But I suppose that means it should just be using the gloabl namespace?

Thanks for your help!

Jason
 
I think the problem is tix. This is a Tcl/Tk extension that may or may not be supported in v8. Regardless of that, it needs to be downloaded separately, something that was apparently done for your older versions.

On the bright side, there are probably substitute widgets and operations you can use if tix is unavailable to you.

_________________
Bob Rashkin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top