ClassAddCSel()

<< Click to Display Table of Contents >>

Navigation:  Explain™ Control Language  > Library Routines > Define classes and functions >

ClassAddCSel()

Description

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.

 

Type

REGULAR FUNCTION

 

Usage

Result = ClassAddCSel(Class, Selector, Value)

 

Class

CLASS

The Class to which the Selector is added.

Selector

STRING

The new Selector.

Value

any type

The default Value for the Selector. This is usually used to assign a method to a selector.

 

Related Topics