uliwitness / Stacksmith

An intuitive software erector kit targeted at people new to programming, but with enough potential to stay useful once they've learned, inspired by HyperCard.
http://stacksmith.org
129 stars 13 forks source link

Support columns in text fields #41

Open uliwitness opened 9 years ago

uliwitness commented 9 years ago
uliwitness commented 9 years ago

Now can hand-craft the XML for a multi-column table field with different column types and show/hide column headers. Still need to expose column/row contents to scripts and add GUI for adding new rows/columns. Also, editing a row currently turns the text into plain text & loses all style information.

uliwitness commented 9 years ago

We now have a columnTypes property that can switch an autoSelect field into multi-column table view mode, and you can show headers and access rows and columns in them and it gets saved.

Getting the feeling this should be a separate part type, though, not a field. Also think we should be setting properties of columns (like "the type of column 1" or "the name of column 3" etc.) instead of a field property that is a list, or even better, what if we pretended there were actual fields, buttons etc. in the table cells and allowed "set the lockText of fld 1 of column 1 of row 5 of list field 6 to true" etc.?

uliwitness commented 7 years ago

Could implement this as a variant of a group. Create a scrolling group and give it a style that lays out its sub-parts in columns and rows. It could then even dynamically create and destroy the OS-specific backing views for each cell depending on if they're in view, and lazily create CPart objects. Might be a bit heavyweight though with lots of cells.