vanilla icon indicating copy to clipboard operation
vanilla copied to clipboard

API for updating column descriptions in List2

Open ghost opened this issue 1 year ago • 2 comments

sometimes the number of columns in a table needs to change based on context: the number of axes in a designspace, the number of points in a glyph, etc.

could we have a proper API for this? something like List2.updateColumnDescriptions()

thanks in avance for considering it!

ghost avatar Sep 10 '24 09:09 ghost

I want to add the following methods:

  • appendColumn(description)
  • removeColumn(identifier)
  • insertColumn(index, description)

It shouldn't be too hard to do. The _buildColumns method called during __init__ just needs to be refactored so that it can do the description to NSTable conversion at any time.

typesupply avatar Sep 11 '24 14:09 typesupply

The most tricky part is matching the data model with the new identifiers: it could be a dict with associated keys or a nsobject with associated methods

typemytype avatar Sep 11 '24 14:09 typemytype