NSTableView autosave with Cocoa Bindings
NSTableView autosave with Cocoa Bindings
- Subject: NSTableView autosave with Cocoa Bindings
- From: email@hidden
- Date: Fri, 23 Apr 2004 11:46:18 -0400 (GMT-04:00)
The documentation for NSTableView mentions that sorting information gets autosaved along the geometry of the columns. I have an NSTableView using Cocoa Bindings for data display and autosave enabled. Sure enough, my plist shows entries for both the geometry and the sorting information, but when I fire up my app the saved sorting info is not applied (i.e. the last table header that was selected is not selected again). I have had this problem with or without specifying the sort key for each column. The geometry instead works flawlessly as it always has.
Am I missing something obvious? I can get the same results by binding the NSTableView sortDescriptors to my NSArrayController sortDescriptors and then saving/restoring those from user defaults, but this is not the elegant Cocoa way, isn't it?
Another question: when adding a new element to the NSArrayController or editing an existing one, the NSTableView needs to be resorted again. What is the best way to capture these changes to the NSArrayController?
Thanks
Gabe
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.