ClassAddISel()

<< Click to Display Table of Contents >>

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

ClassAddISel()

Description

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.

 

Type

REGULAR FUNCTION

 

Usage

Result = ClassAddISel(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