Programming Guide: Direct Scripting

# Programming Guide

## Direct Scripting

The main pieces that work together to support the development of scripted applications are:

- The Script Component

  The script component is the most visible piece. This piece of the OpenDoc system provides the environment for the development, testing, and interpretation of script code. It is the script component that defines and implements the user-interface for these activities and provides the interpretation and runtime support for the script. The script component supplied with OpenDoc is Lotus Script.

- Scriptable Parts

  The script component provides some inherent data and function support but derives much of its value from being able to access the parts of the OpenDoc application and to control those parts. For this capability, the parts need to be scriptable. This means that they must be properly defined and implemented to allow the script component to discover the set of available methods and attributes that those parts have exposed. In addition, the events supported by the scriptable parts provide locations for the script component to attach logic. The script component can arrange for user-specified logic to be invoked when a part triggers an event.

  A scriptable part is an OpenDoc part that is designed and implemented to expose some of its methods for access from the scripting language. With a scriptable part, the application developer can add programming logic to a document containing that specialized behavior for the part. The general purpose part, such as a list box, can be customized, in the context of a particular application, to provide special behavior for the list of special_type that is needed in the application. Scripting languages provide a simple and convenient way to add custom behavior, without having to reprogram the part or subclass it using C, C++, or SOM.

- The Script Code

  The script code provided by the application developer uses the capabilities in the script component to define logic that connects the parts of the OpenDoc document. This script code becomes part of the application.

[ Top | Previous | Next | Contents | Index | Documentation Homepage ]