Loader.tcl
, but no class was defined.
::tycho::loadIfNotPresent
{command package {packagePathList {}}}
The optional packagePathList argument consists of a list of 2 element sublists that contain other package names and pathnames to try and load packagePathList can be used to try to load the package under an alternative name. The sublists consists of two elements, an alternative packagename and a directory to try loading in. The alternative packagename can be empty.
The example below attempts to load TclX to get the profile command. If TclX can't be found, then it looks in $tycho/lib/profile/obj.$PTARCH for a file named tclXprofile.ext, where ext is the sharedlibrary extension returned by [info sharedlibextension]. If that file can't be found then it looks in /users/ptdesign/lib/profile/obj.$PTARCH for the same file
tycho::loadIfNotPresent profile tclx \
[list [list tclXprofile \
[file join $tycho lib profile obj.$env(PTARCH)]] \
[list tclXprofile \
[file join / users ptdesign lib profile obj.$env(PTARCH)]]]