No registered users in community xowiki
in last 10 minutes
in last 10 minutes
Re: [Xotcl] "Cannot locate library"
From: Gustaf Neumann <neumann_at_wu-wien.ac.at>
Date: Mon, 12 May 2003 22:14:52 +0200
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
_at_@ -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
Date: Mon, 12 May 2003 22:14:52 +0200
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
_at_@ -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