Creating new classes
CLIM defines several messages for creating new classes. A class is usually created by defining it as a subclass of an existing class; in that case, the class creation message is sent to the superclass. This message actually results in two classes being added to the system, not one. First, a metaclass is created that describes the new class, and then the metaclass is instantiated to create the class itself.
A few restrictions apply when creating new classes. Any subclass of a variable class, that is, a class like Array that has indexed instance variables, must also be a variable class. Similarly, any subclass of a variable byte class, that is, a class like String that has indexed instance variables that are bytes, must also be a variable byte class. Variable byte classes cannot have named instance variables, and any class with a named instance variable cannot have variable byte subclasses.
Sometimes developers need to create classes that are not subclasses of an existing class. To support this, the special object nil, described in the previous section on CLDT, is extended so that it also understands the class creation messages.
We refer to a class that has no indexed instance variables, that is, only named instance variables, as a fixed class.
Last modified date: 01/29/2015