This article describes how to set up data tables for containers in Tinderbox v6. There is no Inspector for this feature (although Quickstamp can be used). Instead the Map view offers a pop-over for configuring the appropriate attributtes.

1. $TableExpression and $TableHeading

1. $TableExpression and $TableHeading

The data for the table is set via an action code expression in $TableExpression. Optional column heads are for the table are set in $TableHeading. Both attributes belong to the 'Map' group of System Attributes. the image above shows both forms of display, with the one on the left having a heading row (the text above the white line).

2. Containers can show a table OR text

2. Containers can show a table OR text

As the data table is drawn on the face of the container icon, it uses the space otherwise used for the (optional) display of the container's $Text. If a container has both $Text and a $TableExpression, the table is shown.

3. The table expression pop-over

3. The table expression pop-over

The pop-over for configuring table expressions is shown only in Map view, and only when a container (note or agent) is selected. Click the grid icon to open the pop-over.

 

4. Configuring a new table

Configuring a new container table from scratch.

4.1 The controls

4.1 The controls

If no table is yet configured, a blank pop-over opens:

  1. Add/remove table data columns (which actually are rows in this pop-over)
  2. The $TableExpression data for this column.
  3. Optional heading ($TableHeading) for this column.
  4. Tick-box controlling whether table column headings are used. If un-ticked headings are suppressed even if defined in the above table.

4.2 A table with data

4.2 A table with data

The rows shown are drawn as columns. Row #1 is column #1, etc., with the columns ordered left to right. If set (or viewed by other means) $TableHeading is the contents of all of column #1 in the pop-up and $TableExpression the contents of all of column #2.

4.3 Basic table layout

4.3 Basic table layout

The settings in the last step look like this. Ignore the (lower) viewport section of the container for now as this is not affected by the table. Note that as 'Use Headings' has been set, the headings are drawn above the table, divided from it by a ruler.

4.4 Colouring text

4.4 Colouring text

By default, the table is drawn in $NameColor (the colour used for the title) or in $MapBodyTextColor, if the latter is set.

4.5 Ensuring sufficient vertical space

4.5 Ensuring sufficient vertical space

A container with a table can also have a subtitle, but note that if added after the table is set up, you may need to drag the title section of the container icon a bit deeper to reveal now-hidden content.  This demonstrates that the app doesn't adjust the height for you (in case that was assumed). Note that the height of the top part of the overal icon (or bottom part if an agent) is stored in $TitleHeight, which can edited manually or via action code.

4.6 Column headings are optional

4.6 Column headings are optional

Even if there is $TableHeading data, the 'Use Heading' tick-box can be used to suppress the heading row, as shown above.

4.7 Setting up headings

4.7 Setting up headings

If no heading data is added, the tick-box is disabled. If ticked and the pop-up closed, the tick-box is un0ricked when the pop-over is re-opened. There must be heading data to use the headings feature.

5. Editing the data table

How to edit the data entered into the configuration table.

5.1 Adding the first row

5.1 Adding the first row

When the first row is added to a new table, notice that Tinderbox assumes headings will be used. you may either edit and remove the the default 'new column' heading or leave it s un-ticking the tick box will ignore heading data.

5.2 Editing a cell

5.2 Editing a cell

To edit the cell in either column, click-hold-release, as with putting a map icon title into edit-in-place mode.

5.3 Expressions can be action code

5.3 Expressions can be action code

The examples so far have just used single attributes. $TableExpression is an action-type attribute and can thus use more complex expressions.

5.4 Adding/deleting/re-ordering rows in existing data

5.4 Adding/deleting/re-ordering rows in existing data

When adding new rows via the '+' button, they are added after the currently selected row. Thus, with row #2 selected, a new row is added after it as row #3.

Row order can be altered via drag-drop of the rows in the table.

To delete an existing row, use the '-' button.

 

6. Other methods of editing the data table

As with any Tinderbox attribute, values can be seeded by prototype inheritance or set via stamps, rules or OnAdd actions.