Calculist allows a lot of computation similar to a spreadsheet but doesn't quite have a spreadsheet modality. This could be implemented via setting a particular item as the table title (e.g. #29 for configuring metadata via a $properties sub-item).
Example:
New Example Spreadsheet
$properties
View Type [=] Spreadsheet
Spreadsheet Columns [=]
Colour
Size
Flavour
When the $property Spreadsheet Columns
is created it would create two new items named Rows
and Row 1
.
Then when each Spreadsheet Column e.g. Colour
is added it would similarly add a corresponding sub-item for it below Row 1
(adding each letter in real-time or when the user moves their cursor position).
New Example Spreadsheet
$properties
View Type [=] Spreadsheet
Spreadsheet Columns [=]
Colour
Size
Flavour
Rows
Row 1
Colour [=]
Size [=]
Flavour [=]
New row creation would happen simply by pressing the Enter
key when the cursor position is at the last column of the last row. Instead of only creating a new empty item as per usual, it would automatically prepopulate with Row 2
and all of the relevant sub-items/columns with no set values.
Row 1
Colour [=] Red
Size [=] Large
Flavour [=] Banana
Row 2
Colour [=]
Size [=]
Flavour [=]
It should also be impossible to delete the items within each row, and trying to do so only empties the "cells". To delete the columns completely it has to be done by deleting the relevant column Spreadsheet Columns
from the $properties
section.
Row 1
Colour [=]
Size [=]
Flavour [=]
Spreadsheets in Calculist implemented also can play well with other Calculist features, for example:
- Command mode on one of
Spreadsheet Columns
values e.g. sort columns A-Z
- Computation within each cell/item
- Accessors to reference columns, rows or cells in a simple format like Excel's e.g.
Row 1
or Column A
or Item A3:A7
I think this is a decent draft of how to make a spreadsheet work within Calculist and fits in line with it's overall approach (although challenging to implement), let me know what you think.