User Guide
handlers() 355
handler()
Usage
scriptObject.handler(#handlerSymbol)
Description
This function returns TRUE if the given scriptObject contains a specified handler, and FALSE if
it does not. The script object must be a parent script, a child object, or a behavior.
Parameters
symHandler
Required. Specifies the name of the handler.
Example
This Lingo code invokes a handler on an object only if that handler exists:
if spiderObject.handler(#pounce) = TRUE then
spiderObject.pounce()
end if
See also
handlers(), new(), rawNew(), script()
handlers()
Usage
scriptObject.handlers()
Description
This function returns a linear list of the handlers in the given scriptObject. Each handler name
is presented as a symbol in the list. This function is useful for debugging movies.
You cannot get the handlers of a script cast member directly. You have to get them via the
script
property of the member.
Parameters
None.
Example
This statement displays the list of handlers in the child object RedCar in the Message window:
put RedCar.handlers()
-- [#accelerate, #turn, #stop]
This statement displays the list of handlers in the parent script member CarParentScript in the
Message window:
put member(“CarParentScript”).script.handlers()
-- [#accelerate, #turn, #stop]
See also
handler(), script()