Overview

This Pnuts User's Guide describes basic usage of Pnuts environment.

Pnuts functions fall into two categories: built-in functions and others. It is important to distinguish them. Built-in functions are guaranteed to be available even when initialization script is not loaded and it is not permissible to re-define them. The Language Specification defines the built-in functions. Other functions in the distribution package are available when initialization script (/init.pnut) is loaded. The User does not always have to use them. Also the User can re-define or extend them. Backward compatibility of built-in functions are guaranteed but other functions can be modified in an incompatible way in future versions.

Besides, pnuts.ext package is provided separately from the JAR archive. Classes in this package are examples of making use of the extensibility of Pnuts. User can learn how to extend Pnuts reading the source code of these classes.

GUI scripting in Pnuts is based on AWT programming in Java. User can write GUI programs with public classes and public methods of AWT. Besides, Pnuts has two extensions to allow simple GUI scripting. One is callback mechanism. The User can bind a function to an object as an event handler. Another one is GUI layout. PnutsLayout and Hierarchical Layout make layout coding considerably easier.

A set of functions that support multi-threading is provided. But because Java has a more sophisticated synchronization mechanism than Pnuts, User should consider which language to be used for multi-threading.

Pnuts API enables seamless interaction between Pnuts and Java. It is easy to call a Pnuts script from Java. It does not need any special initialization to use.


Back