This container is somewhat different from a window or layout, in that all children are of the class tableField and, if necessary, are re-bound to that class when a table is bound. If a table object is altered so as to omit some of its original children, the usual specification rule applies: those children remain on the screen, but not as part of the table object. Instead, they have independent displays, in the formats of their default display classes. In particular, they do not remain bound to the class tableField. An object can be bound to the tableField class only by A+ and only as a child of a table object. The children of a table object must be unique.Visual Representation
A variable can be bound to the table display class if it is a scalar or vector consisting of object symbols. The child objects, which are also called fields of the table, can be vectors or simple character matrices; they cannot appear more than once in the table variable. The display consists of a title area and a value area. The value area has a title bar on top that holds the names of the fields, while the area below consists of delineated cells, one column for each field. The fields appear on the screen in the same left to right order as their symbols appear in the variable that is bound to the table class. The top cell of each field is the first element of the corresponding variable; in the case of a character matrix field, the cells correspond to rows of the matrix and the top cell is the first row.
If a table requires more than just a few cells, then by default only a subtable is presented on the screen, and the display is provided with scrollbars. If the table fields have different numbers of elements, then whether or not a vertical scrollbar is used depends on the number of elements in the first field (i.e., t for a table t). The particular subarray that appears in the value area can be controlled by the scrollbars and settings of the attributes firstrow, firstcol, rows and cols. Neither by scrollbars nor by firstrow is it possible to display rows for which the first field has no value: the number of elements in the first field completely controls the rows that can be displayed. If the table fields have different numbers of elements and you want to allow the display of all elements, the first field must have at least as many elements as any other field. For a table, the attribute firstcol refers to the leftmost field shown, and cols refers to the number of fields.
Be aware of one situation that can occur. Suppose a visible field is dependent upon the first field and another field, c:a+b, say. If a strand assignment changing their lengths is made to a and b, what happens depends upon the order in which the individual assignments are made. If the assignment to the first field is made last, there is no problem. Otherwise, the assignment to the first field causes the table to use its new length to determine the range of the vertical scrollbar and that involves materializing the field "too early", when a and b have unequal lengths, causing a length error in the evaluation of c. One workaround, as implied above, is to see that the first field is set last. Another is to unmap the table, perform the assignment, and then map it again.
Attributesthousandsū10«hundredsū10«tensū10«onesūÉ10 tū`ones`tens`hundreds`thousands `t is `table `t has (`shelltitle;'t') show `tA Table of Numeric Fields:
See the "Display Attributes" chapter for details concerning all the attributes that apply to objects in the table and tableField display classes, as well as lists of colors and fonts. The keys in the Table of All Display Attributes that pertain to the table class are T, ALL, CNFT, NFT, and TOP.
The attributes that are meaningful for the table display class (other than the print... attributes) are:
The keys in the Table of All Display Attributes that pertain to the tableField display class are tF and ALL.
The attributes that are meaningful for the tableField display class are:
active(Point the mouse cursor to an attribute to display a short description at the bottom of the screen)
|email@example.com||© Copyright 19952008 Morgan Stanley Dean Witter & Co. All rights reserved.|