ClassAddCSel()
ClassAddCSel()
Type: REGULAR FUNCTION
Purpose: Add a function or variable 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 a class function, otherwise it is a class variable. After the selector is added, you can use it like any other selector.
Usage: Result = ClassAddCSel(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. |
Comments are closed.