2026/11/16
< 2026
|
Monday, November 16, 2026 (#320)
|
|
References |
Main Work
- DBA
- ⇒ problem: dumping each schema using the previous schema's filename
- ⇒ improving logging output so I can figure out what's going on
- ⇒ new rich-text output system
- ⇒ trying to work out how to do styles that have structural dependencies
- ⇒ new rich-text output system
- ⇒ improving logging output so I can figure out what's going on
- ⇒ problem: dumping each schema using the previous schema's filename
When formatting a table in a fixed-pitch Venue, the Table Style needs to iterate through every cell in the table to find the longest string in each column. Each cell in each row then need to be formatted with the knowledge of the width of that cell's column.
However:
- P1 We don't want to store data persistently in any Style objects, because they can be reused to render other tables.
- P2 We don't want to store data in any of the RText objects, because they should be Venue-agnostic (and some Venues don't need to calculate width, while others in the future may need different metrics calculated).
- P3 The TCell Style objects will need to know information (column-widths) which is stored elsewhere (the Table Style object would make the most sense, leaving aside P1) -- but TCell style-objects have no link back to any of their parent-styles (TRow, TTable).
- A1: Perhaps what we need is a helper-object to hold onto the column data. The trick then becomes P3: how do we pass that object down from Table to TCells?
- A3 pondering:
- The Table Style iterates through TRow RText objects, and through the TCell RText objects within those, when it is calculating widths. The TRow and TCell RTs have Attributes which pull up Styles, and one of those Styles will be the one that needs the information... but that seems very flimsy.
- Maybe RText objects should optionally host some kind of generic "OStyleData" object (like a "native" object in that the host doesn't really know what it does, and is just carrying it around for other classes to use)? Then the Table Style can save the Columns data there, and the podling-styles can crawl back up the RText tree to get to it.