A handler is an ordinary script that is called by the interpreter to carry
out a specific task. They are installed using functions such as
installPaintHandler and menu.
The value passed to the installation function is the index of
the script that does the actual handling. The script index operator (&)
is used to take the index of a script.
installPaintHandler(&myPaintScript);
Each handler has a set of specifications you must follow: it requires
a certain number of parameters, and some require that you return a value
for some purpose. These specifications are documented under their respective
handler installation function.
Handlers should never take more than one interpereter cycle to execute
(i.e. they should never delay or call a function that delays). If a delay
occurs inside a handler, the handler will stop execution and return an
undefined value.
See Also...
|