2 Concepts

A vtable lists data about a number of objects. Each object can be a list or a vector, but it can also be anything else.

To get the value for a particular column, the getter function is called on the object. If no getter function is defined, the default is to try to index the object as a sequence. In any case, we end up with a value that is then used for sorting.

This value is then formatted via a formatter function, which is called with the value as the argument. The formatter commonly makes the value more reader friendly.

Finally, the formatted value is passed to the displayer function, which is responsible for putting the table face on the formatted value, and also ensuring that it’s not wider than the column width. The displayer will commonly truncate too-long strings and scale image sizes.

All these three transforms, the getter, the formatter and the display functions, can be defined on a per-column basis, and also on a per-table basis. (The per-column transform takes precedence over the per-table transform.)

User commands that are defined on a table does not work on the displayed data. Instead they are called with the original object as the argument.