pkgIndex.tcl for Itcl doesn't load Itcl in vanilla wish 
Author Message
 pkgIndex.tcl for Itcl doesn't load Itcl in vanilla wish

Itcl IncrTcl 3.1 Bug:  Generated by Scriptics' bug entry form at
        http://www.*-*-*.com/
Responses to this post are encouraged.
------

Submitted by:  Owen Funkhouser
CVS:  2000/01/14 11:00 a.m. CST
OperatingSystem:  Windows NT
OperatingSystemVersion:  4.0 SP 6
Machine:  Intel
Synopsis:  pkgIndex.tcl for Itcl doesn't load Itcl in vanilla wish

ReproducibleScript:
from wish82.exe:

% package require Itcl
couldn't load file "C:\JMASS98\PCP\NT4.0\intel\lib\itcl3.1\itcl31.dll": invalid argument
%

ObservedBehavior:
The pkgIndex.tcl for Windows is:

# Tcl package index file, version 1.0

package ifneeded Itcl 3.1 [list load [file join $dir itcl31.dll] Itcl]

Here, $dir evaluates to the lib directory, not the bin directory where the DLL is located.  Either the pkgIndex.tcl needs to point to the bin directory, or a copy of the DLL should be placed in the appropriate lib directory by makefile.vc.  The first solution makes more sense.

DesiredBehavior:
On UNIX (where no itkwish executable is built), the package require command properly loads Itcl.  The same should work on Windows.

Patch:
*** pkgIndex.tcl        Mon May 24 16:10:46 1999
--- new-pkgIndex.tcl    Fri Jan 14 14:23:15 2000
***************
*** 1,3 ****
  # Tcl package index file, version 1.0

! package ifneeded Itcl 3.1 [list load [file join $dir itcl31.dll] Itcl]
--- 1,5 ----
  # Tcl package index file, version 1.0

! package ifneeded Itcl 3.1 [list \
!       load [file join [file dirname [info nameofexecutable]] itcl31.dll] \
!       Itcl]

PatchFiles:
    incrTcl/itcl/win/pkgIndex.tcl

Comments:
The same problem exists with incr Tk.



Tue, 02 Jul 2002 03:00:00 GMT  
 pkgIndex.tcl for Itcl doesn't load Itcl in vanilla wish

Quote:

>Here, $dir evaluates to the lib directory, not the bin directory where the DLL is located.  Either the pkgIndex.tcl needs to point to the bin directory, or a copy of the DLL should be placed in the appropriate lib directory by makefile.vc.  The first solution makes more sense.

In my opinion, which doesn't either of us is wrong, itcl31.dll should be in the
/lib/itcl3.1 directory and use a package index like the following:

package ifneeded Itcl 3.1 [subst {
  [expr { \
    [info exist tcl_platform(debug)] == 1 \
    ? "load \"[file join $dir itcl31d.dll]\" Itcl" \
    : "load \"[file join $dir itcl31.dll]\" Itcl" \
  }]
  namespace import ::itcl::*

Quote:
}]

Comment out the 2 namespace import lines for your flavor of scope.  Maybe the
install target in makefile.vc needs the edit instead.

And more appropriately, one of these days shells should use Stubs so extensions
they link to don't have to ALL sit in the damn /bin directory.

http://www.scriptics.com/live/showurl?i=software%2epatches%2etcl82b2&...
--
* David Gravereaux *
Tomahawk Software Group

"Things should be as simple as possible, but not simpler." -- Albert E.



Tue, 02 Jul 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. itcl 3.1.0 doesn't build correctly

2. Itcl/Itk/Iwidgets on Mac doesn't work

3. Itcl class protos and itcl::body definitions

4. itcl 3.1.0 test suite still has itcl 3.0.0 workaround

5. Problem loading Itcl

6. Problem loading iTcl

7. How do you load BLT in Itcl

8. itcl vs load command

9. auto-loading itcl classes

10. converting Java app to Tcl/Tk ( new thread for all the tcl/tk itcl gurus)

11. Tcl Shell doesn't refer to registry entry when loading

12. Loading TK-4.1 under TCL-7.5 doesn't work

 

 
Powered by phpBB® Forum Software