External Instructions Next: External class Up: The SugarCubes Tool Box Previous: Interpretor

External Instructions

Reactive Scripts ``external statements'' are used to interact with the external system (for data management, graphic interactions, etc.). To implement this in Java, we build a mechanism that allows Java objects to register themselves as external objects on which reactive scripts can invoke methods through external calls. Please remark that we donot take advantage of the new features of Java 1.1 such asintrospection, to be able to use our package on Java 1.0 Virtual Machines.

External statements are enclosed between braces and use a reduced Java-like syntax, as in the following examples:

Invocation of a method on a registered object return one of the three basic type results: an integer, a string or a boolean. The following examples show how external statements are used: