ClassAddISel()

Type: REGULAR FUNCTION

Purpose: Add an instance selector, e.g., an instance name, to a class.

This function is designed mainly for dynamically created classes, but can be used (carefully) to modify the action of existing classes. If a selector already exists for that class, it is overwritten with the new definition. If the Value is a callin or native Explain™ function, the new selector is an instance function, otherwise it is an instance variable. After the selector is added, you can use it like any other selector. Objects created before the selector is added are not modified.

Usage: Result = ClassAddISel(Class, Selector, Value)

  Class CLASS The class to which the selector is added.
  Selector STRING The new selector.
  Value any value The default value for the selector. This is usually used to assign a method to a selector.

Related Topics Link IconRelated Topics