The Table Objects: 4 Using a Table Object

Up: GEOS SDK TechDocs| Up | Down | Prev: 3 TableClass Instance Data | Next: 5 TableContentClass

The Table object is designed to be easy to use. You cannot use a TableClass object directly; you will need to define a subclass of TableClass in order to intercept certain required messages. You will also need to set a few instance fields when you define the Table in your source code.

The Table object must appear within a TableContent object. If it is within a regular VisContent, crashes may result.

When you create a Table object, you will need to set the following instance data fields (the other fields may be left with there default values):

TI _rows
This is the number of rows in the Table . You may set this field to zero. (You can add and remove rows at run-time.) For more information, see Working with Rows.
TI _columns
This is the number of columns in the Table . This must be at least one. You cannot currently add or remove columns at run-time. For more information, see Defining Columns.
TI _visibleRows
This is the number of rows visible on-screen at any one time; thus, this field, together with TI _rowHeight , define the height of a Table object. This field must be at least 1.
TI _columnDefinitions
This is the handle of a chunk containing an array of TableColumnDefinition structures, which specify the properties of the Table 's columns. For more information, see Defining Columns.
TI _rowHeight
This is the height of a row in points (72 points = 1 inch, so 28.3 points ª 1 centimeter). This must be larger than zero.

In order to use a TableClass object, you must define handlers for a few messages. As a general rule, your handlers should call the TableClass handlers after they take their actions; in some cases, your handlers's main role is to add extra data to the message, which will be interpreted by the default handler.

You should define handlers for the following tasks:


Up: GEOS SDK TechDocs| Up | Down | Prev: 3 TableClass Instance Data | Next: 5 TableContentClass