All functions and classes defined and evaluated in the Lisp editor can be used in OM patches immediately.
Evaluate the function or class in the Lisp editor.
Cmd
click in the patch and type the name of the function or class.
The default package of a function or class edited in the Lisp Editor is the Cl-user package. In this case, its name must be preceeded by "cl-user::".
To be able to type a name directly in the patch editor, add "(in-package :om)" before the corresponding code in the lisp editor.
User-defined functions or classes can appear as "dead boxes" if the patch they belong to is saved and reloaded at another OM session. You will then have to reload the function or class.
It is advised to create user libraries : your own Lisp classes and functions will be preserved and available for use at any time.
There exist several ways to load existing Lisp code in OM :
|
|
|
|
To access the source code of a component within a patch, select it and press e
. It will be displayed when available.
The source code is accessible if the function or class is
|
The source code is not accessible if
|
The sources of existing OM functions can be found, edited and reevaluated with the Find Source utility. Nevertheless, it is advised to copy, rename and modify these functions. This allows to avoid disorders or conflicts, and to track and reload changes at the next session.