Read Me - Common Public License V1.0 - Copyright Notice(©)

setMethod


>>-setMethod(methodname-+----------------------+--)-----------------><
                        |         +-,"FLOAT"-+ |
                        +-,method-+----------+-+
                                  +--,scope--+

Adds a method to the receiver object's collection of object methods. 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 [method] can be a string containing a method source line instead of a method object. Or it can be an array of strings containing individual method lines. In either case, [setMethod] creates an equivalent method object.

The third parameter describes if the method that is attached to an object should have object or float scope. "Float" scope 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.

[Notes:]

  1. The setMethod method is a private method. See the setPrivate method in for details.
  2. The setMethod method is a protected method.

Read Me - Common Public License V1.0 - Copyright Notice(©)