artofillusion.script
Class ScriptRunner

java.lang.Object
  extended by artofillusion.script.ScriptRunner

public class ScriptRunner
extends java.lang.Object

This class is used for executing scripts.


Constructor Summary
ScriptRunner()
           
 
Method Summary
static int displayError(java.lang.Exception ex, int lineOffset)
          Display a dialog showing an exception thrown by a script.
static java.lang.Object executeScript(java.lang.String script)
          Execute a script.
static bsh.Interpreter getInterpreter()
          Get the interpreter for running scripts.
static ObjectScript parseObjectScript(java.lang.String script)
          Parse an Object script.
static ToolScript parseToolScript(java.lang.String script)
          Parse a Tool script.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ScriptRunner

public ScriptRunner()
Method Detail

getInterpreter

public static bsh.Interpreter getInterpreter()
Get the interpreter for running scripts. This ensures that all scripts are run with the same interpreter, so they will all share the same global namespace.


executeScript

public static java.lang.Object executeScript(java.lang.String script)
Execute a script.


parseToolScript

public static ToolScript parseToolScript(java.lang.String script)
                                  throws java.lang.Exception
Parse a Tool script.

Throws:
java.lang.Exception

parseObjectScript

public static ObjectScript parseObjectScript(java.lang.String script)
                                      throws java.lang.Exception
Parse an Object script.

Throws:
java.lang.Exception

displayError

public static int displayError(java.lang.Exception ex,
                               int lineOffset)
Display a dialog showing an exception thrown by a script. This returns the line number in which the error occurred, or -1 if it could not be determined.



Copyright © 1999-2008 by Peter Eastman.