I was thinking about how to make the table widget more customizable, for example being
able to dynamically add a column to a table.
It just occurred to me that maybe it was even possible to do it without getting into the
Morphic code, just using Glamour.
So be it. It works.... sort of.... It does not refresh the table layout but the finder
shows it is there.
| finder |
finder := GLMFinder new.
finder table
title: 'Number';
display: [ :x | 1 to: x ];
act: [:p| p column: 'Double' evaluated: [ :each | (each * 2) asString ]. p
update ]
entitled: 'add column';
actions: [ :list | self actionsFor: list ];
column: 'Even' evaluated: [ :each | each even asString ];
column: 'Odd' evaluated: [ :each | each odd asString ].
^ finder
In the end, I guess it's better to handle this in the Morphic layer, including having
a button rather than a menu item to perform such a task.
--
Simon