[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

20021227: McIDAS-X v2002 with newer versions of Tcl/Tk (cont.)



>From: Wahner Paul Contr CSR4500 <address@hidden>
>Organization: Cape Canaveral Air Force Station
>Keywords: 200211141352.gAEDqZL18153 McIDAS-X TclTk 8.4.0

Hi Paul and Todd,

>I finally got around to playing with this some more. I used your steps above
>as a guide but with a few exceptions. I tried to stay as close as possible
>to the core McIDAS installation. Here is the way I did it: 
>-> Uninstall and unmake of McIDAS 2002
>-> Uncompress and untar the Mcidas 2002 distribution file
>-> Remove the McIDAS 2002 distribution file to prevent the shell script from
>seeing it. 
>-> Moved the original tcl & tk directories to tcl8.0.4 and tk8.0.4
>-> Uncompressed and untarred tcl8.4.1 and tk8.4.1
>-> Moved these directories to tcl and tk 
>-> CD to the src directory and copy in the four routines you modified and
>provided to me, tkAppInit.c, wishinit.c, wishmcid.c and mci_curs.c
>-> export CC=cc (because I'm still running and compiling under HP-UX10.20)
>-> Run the McIDAS shell script make and install.

OK.

>When running the McIDAS gui I got the following error when trying to run the
>image display gui " invalid command name "tkTabToWindow" ". After some
>research it turns out that this error is generated by a change originally
>made in tcl/tk 8.3.3 in which they moved tk private commands (tkTabToWindow)
>into 
>::tk Namespace. See attached links for reference:
>
>Migration to 8.4: Tk Private Commands
>http://mini.net/tcl/3670
>
>TIP #44: Move Tk's Private Commands and Variables into ::tk Namespace
>http://www.tcl.tk/cgi-bin/tct/tip/44.html

Right.  A number of private commands that I was using were moved into
the unsupported list.  My solution was much the same as the one recommended\
in http://mini.net/tcl/3670, but it is a little more backwardly compatible.
I added the following to my code:

    # Tk widget commands moved to namespaces with version 8.1 and higher
    # Expose the old private Tk commands.
    if { $tk_version >= 8.1 } {
      ::tk::unsupported::ExposePrivateCommand tk*
    }

So, if one decides to keep using Tcl/Tk 8.0.4, s/he does get an error
when trying to execute '::tk::unsupported::ExposePrivateCommand tk*'.

>I found references to tkTabToWindow in four files: ImageSelect.tcl,
>Maps.tcl, ServerList.tcl and config.gui. I applied the temporary workaround,
>suggested in the link and I've experienced no other errors while running the
>McIDAS gui. 

OK.  I made similar changes in these files for my distribution.

>I found a list of these private command and variables in the file
>"unsupported.tcl" under ~mcidas/mcidas2002/tk/library. I ran a quick check
>to see how many of these private commands are beeing used and fortunately
>"tkTabToWindow" was the only one. 

My MCGUI was not this free of use of old, private commands.  That is why
I exposed all of the commands listed in unsupported.tcl.

>As I said before, I've had no other problems with the McIDAS gui but I'll
>admit I've really not done an exhaustive test either.

Since I don't use the GUI, I am relying on you to have found all of the
gotchas.

>Hopefully I've
>provided enough information to get the ball rolling on getting Tcl/Tk
>upgraded in McIDAS officially??? Todd???

Part of this process is my updating the SSEC CVS with the code mods
that I made.  I will start this process (which is time consuming)
today.

Tom