org.openware.util.tcl
Class TclLoader

java.lang.Object
  |
  +--org.openware.util.tcl.TclLoader

public class TclLoader
extends java.lang.Object

Class to load Tcl scripts in the same way that Java class files are loaded. That is, each script is given a package name and is searched for in the Java classpath. This way, you can include your Tcl scripts with your Java class files and the TclLoader will find them.

Author:
Vincent Sheffer

Constructor Summary
TclLoader()
          Default constructor for TclLoader.
 
Method Summary
 void loadScript(tcl.lang.Interp interp, java.lang.String scriptName)
          Load a Tcl script into the given Tcl interpreter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TclLoader

public TclLoader()
Default constructor for TclLoader.
Method Detail

loadScript

public void loadScript(tcl.lang.Interp interp,
                       java.lang.String scriptName)
                throws tcl.lang.TclException,
                       TclLoaderException
Load a Tcl script into the given Tcl interpreter.
Parameters:
interp - The Tcl interpreter to load the script into.
scriptName - The full package name of the script to load.
Throws:
tcl.lang.TclException - if there is an error evaluating the tcl script.
TclLoaderException - if the Tcl script cannot be found.


Copyright © 2000, 2001 Openware, Spin Software. All Rights Reserved.