Language Guide
CHAPTER 5
Objects and References
120 Using Object Class Definitions
Figure 5-1 shows a sample object class definition for a paragraph object. The
definition contains four types of information: properties, element classes,
commands handled, and default value class returned. The sections that follow
describe the kinds of information provided by an object class definition.
Properties 5
A property of an object is a characteristic that has a single value, such as the
name of a window or the font of a character. Properties are contained by objects
in much the same way that elements are. The main difference is that each of
an object’s properties has only one value, whereas an object may have many
different elements of a single class. Properties of an object are distinguished
from each other by their unique labels.
The definitions for two properties (from a total of six) are visible in the object
class definition shown in Figure 5-1. These properties’ labels are Font and Size.
The definition also lists the class to which each property belongs. For example,
the class of the Font property is String, indicating that the value of the Font
property is a character string. Properties can belong to object or value classes.
Element Classes 5
Elements are objects contained within an object. The element classes listed in
an object class definition indicate what kinds of elements objects of that object
class can contain. An object can contain many elements or none, and the
number of elements of a particular class that it contains may change over time.
Most application and system objects can contain elements.
The definition in Figure 5-1 shows that a paragraph object can include word
elements. It is possible for a paragraph to have no words. At a later time, the
same paragraph might have many words.
Commands Handled 5
Objects that belong to the same class can respond to the same commands.
Object class definitions list the commands to which all objects of that
class respond.