Persistence of Sort Orderings in NSTableView using Bindings
Persistence of Sort Orderings in NSTableView using Bindings
- Subject: Persistence of Sort Orderings in NSTableView using Bindings
- From: "Ryan Poling" <email@hidden>
- Date: Tue, 12 Dec 2006 11:19:56 -0800
I have a very simple desire I would like fulfilled. ;-) I'd like my
NSTableView which is hooked up to an NSArrayController via Cocoa
Bindings to remember **and** restore its sort orderings at each launch.
Currently, the sort orderings are dutifully saved in my user defaults as
"NSTableView Sort Ordering myTable" but they are never restored.
I've googled this a bit - found one other person with the same problem,
but nobody replied to his email about it.
I currently have each NSTableColumn bound to the NSArrayController's
value and color attributes, and from what I've read, it looks like the
NSTableView's content, selectionIndexes and sortDescriptors should be
automatically bound when I bind the columns. Just in case, I tried
binding them manually with no luck (and have taken those bindings off
again now).
From the Cocoa documentation on NSTableView:
"Discussion
A table column is considered sortable if it has a sort descriptor that
specifies the sorting direction, a key to sort by, and a selector
defining how to sort. The array of sort descriptors is archived. Sort
descriptors persist along with other column information if an autosave
name is set."
I have my autosave name set... I guess the docs just say that the info
persists, not necessarily that it restores, but everything else about
the table restores itself from the user defaults.
Any ideas?
Thanks,
-Ryan
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden