How to sort smoothly when NSTableColumn's Sort Key is empty
How to sort smoothly when NSTableColumn's Sort Key is empty
- Subject: How to sort smoothly when NSTableColumn's Sort Key is empty
- From: an0 <email@hidden>
- Date: Tue, 3 Jun 2008 23:52:26 +0800
I know how to sort items in NSTableView when each NSTableColumn
corresponds to a property of the item object.
But what if there is only one NSTableColumn and it is just mapped to
the item object itself instead of a property of it?
I set the Selector to "compare:" and leave the Sort Key to empty for
the NSTableColumn in Interface Builder. It seems items can be sorted
once in such a case but the order can not be reverted by clicking the
column header again.
And the NSTableView's sortDescriptors are found cumulated instead of
changed by NSLog in dataSource's tableView:sortDescriptorsDidChange:
method.
What is the right configuration for such a case then?
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please 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