5.1.4.22. setMethod (Private Method)
The
methodname
is the name of the new
method. This name is translated to uppercase. If you
previously defined a method with the same name using
setMethod, the new method
replaces the earlier one. If you omit
method,
setMethod makes the
method name
methodname unavailable for the
receiver object. In this
case, sending a message of that name to the receiver object runs the
unknown
method (if any).
The third parameter is optional, and describes if the method that is attached to an
object should have
OBJECT or
FLOAT scope.
FLOAT scope, which is the default, means that it shares
the same scope with methods that were defined outside of a class.
OBJECT scope means it shares the scope with other,
potentially statically defined, methods of the object it is attached to.