robotools / vanilla

A Pythonic wrapper around Cocoa.
MIT License
78 stars 28 forks source link

API for updating column descriptions in List2 #217

Open gferreira2 opened 2 months ago

gferreira2 commented 2 months ago

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!

typesupply commented 2 months ago

I want to add the following methods:

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.

typemytype commented 2 months ago

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