0
votes

I am using a NSTableView controlled by an NSArrayController and have Value Bindings arrangedObjects with Create Sort Descriptor enabled.

When the view is initially displayed it is "unsorted" (actually displayed in the same order as the NSArray, which is sorted).

If I click on a Column Header I can change the sort order or sort column, which is handy.

What I would like to do is be able to restore to the "unsorted" order and disable the Column Header highlight and sort indicator.

Is this possible and if so, how?

1

1 Answers

-1
votes

You want to do that programmatically? You can probably set the array controller's sort descriptors to either nil or the empty array. Use the -setSortDescriptors: method of NSArrayController. I don't recall if it's necessary to then call -rearrangeObjects. Probably not.