Labels as field headings

Multiple fields can cause confusion to users who do not know what the fields contain. One solution is to use a label that identifies the fields, such as

       Damage_and_date Text Text
This may not work well for more than two fields. Suppose for example we have a structure in some class that will be used to display a table of values:

        Results Int Text Text Text
e.g.,

Results   1  Sam   Tom   Bob
          2  Ron   Ted   Pam
          3  Cam   Zak   Liz
Sometimes it is possible to label the columns by providing a place in the model for a heading:

        Table UNIQUE Text           //here is the heading
        Results Text Text Text Text //here is the data
One could then enter
TShirt : Sam1 
Table "Group   A       B       C"
Results 1 Sam Tom Bob
Results 2 Ron Ted Pam
Results 3 Cam Zak Liz
The user sees

Notice that the table heading is a single Text entry. Its multiple spaces are an inherent part of the entry and are maintained by ACEDB. By experimenting with the spacing, you may be able to align the data with the headings.

This is not always possible because of the way ACEDB creates its text displays. If the data itself is irregular in width it may be impossible. You will have to arrive at a solution emperically. Don't forget to try substituting shorter or longer labels for "Table" and Results" as well as varying the number of spaces in the heading.

[I am indebted to Dave Matthews for suggesting this method for creating column headings]

Tables and the TableMaker

If you find yourself trying to make large, elaborate tables using the method above, you may be attempting to emulate a relational database. Remember that tables can be generated by the TableMaker and can extract data from within an object. For convenience, table definitions can be prepared by the curator and distributed along with the database.

It is also possible to associate table definitions with a class. These become available to users via a pull-down menu in text windows.

A simple example might be to create a table that will be available in any object of the Person class. For example, it might display people's names in column 1 and their e-mail addresses in column 2. The table definition would be prepared interactively using the "point and click" TableMaker tool in ACEDB and then saved, perhaps with the name "e_mail.def" in the wquery directory.

e_mail.def is associated with the Person class in wspec/table.menu.wrm with the Person class. This places a menu button on all windows displaying Person information. A user can select the table definition which automatically generates the table. Here the menu item will be titled "E_mail_addresses".

Person
E_mail_addresses : wquery/e_mail.def

Show me the whole t-shirt model again.

Back to Table of Contents