View · Search · Index
No registered users in community xowiki
in last 10 minutes

Re: [Xotcl] "Cannot locate library"

From: <MichaelL_at_frogware.com>
Date: Mon, 12 May 2003 17:27:19 -0400

I don't know if this helps, but my approach was to add the following in
xotcl-1.0.2/pkgIndex.tcl:

set _dir_ $dir
foreach {subdir} {
    library/actiweb
    library/comm
    library/lib
    library/patterns
    library/rdf
    library/registry
    library/serialize
    library/store
    library/xml
} {
  set dir [file join $_dir_ $subdir ]
  source [file join $dir pkgIndex.tcl]
}
set dir $_dir_
unset _dir_

This isn't as elegant as it could be--for example, the list of subdirs
could obviously be dynamically generated--but it does use the existing
package loading mechanism (including the default pkgIndex.tcl files in the
subdirs).

Gustaf Neumann <neumann_at_wu-wien.ac.at> wrote on 05/12/2003 04:14:52 PM:

> 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.