سؤال

I have an NSTableView created in Interface Builder with some columns. I've set the tableview to autosave its settings (I set the autosave name in the Attributes Inspector and checked Column information). Now I want to add some other columns programmatically, but when I quit the app and relaunch it, these newly added columns disappear and the ones created in Interface Builder reappear. Googling I found a work-around: changing the width of the added column gets the job done, but there must be a better solution!

EDIT: changing the column width only works sometimes.

هل كانت مفيدة؟

المحلول

Maybe you need to load the autosave data at the applications/NSTableView load?

نصائح أخرى

the position, size and ishidden of a NSTableColumn is autosaved -- using the InterfaceBuilder autosave method. make sure to hit the 'Column Information' checkbox...

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top