[Xotcl] "Cannot locate library"

Gustaf Neumann neumann at wu-wien.ac.at
Mon May 12 22:14:52 CEST 2003


On Monday 12 May 2003 20:04, Uwe Zdun wrote:
> Looking through this code again, the ::xotcl::lib is not really used in
> XOTcl's code anymore ... 

 hmm? The line after the error message says: 
    set ::auto_path [concat $::xotcl::lib $::auto_path]
 if the variable is not set, you get the error message there.
 it is certainly possible to set a default value, say from the
 configure prefix....

 The more sensible change is to use the patch below, which will
 be ok, when you load xotcl via xotclsh, but will not find xotcl
 packages, when xotcl is loaded via tclsh; try:

  tclsh
  package require XOTcl
  namespace import ::xotcl::*
  package require package

 Currenty, xotcl does a patch checking in C (findXOTcl.c) and
 in tcl (predefined.xotcl). my hope was rather to get rid of the c-code...
 The background of this code is as follows:
   - tcl searches the libraries in auto_path and the subdirs of that.
   - with xotcl i would like the get one more level to organize the
     xotcl packages more nicely.
   - therefore the xotcl library is added to the auto_path.
 We would not need the library, when we assemble a large
 tclIndex.tcl file in the xotcl directory. Maybe that is the better
 way... we will check this more carefully...

 best regards
-gustaf

-- predefined.xotcl~   2003-04-24 22:49:14.000000000 +0200
+++ predefined.xotcl    2003-05-12 21:48:20.000000000 +0200
@@ -357,12 +357,9 @@
        }
     }

-    if {![info exists success]} {
-       puts stderr "Cannot locate the XOTcl library on your system!"
-       return 0
+    if {[info exists ::xotcl::lib]} {
+        set ::auto_path [concat $::xotcl::lib $::auto_path]
     }
-    #puts stderr "[info exists success] <$::xotcl::lib>"
-    set ::auto_path [concat $::xotcl::lib $::auto_path]

     #
     # and forget all "xotcl::" packages in Tcl's packageTable so that they



-- 
Univ.Prof. Dr.Gustaf Neumann
Abteilung für Wirtschaftsinformatik
WU-Wien, Augasse 2-6, 1090 Wien



More information about the Xotcl mailing list