• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Removing sorting from NSTableView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Removing sorting from NSTableView


  • Subject: Removing sorting from NSTableView
  • From: Gideon King <email@hidden>
  • Date: Mon, 19 Jul 2010 04:10:50 +1000

Sorry if this is a dumb question, but when someone has clicked a column header to sort a table on that column, how do they get it back to its natural, unsorted order?

In a certain other operating system, the standard behaviour seems to be that the sorting is three state: ascending/descending/unsorted, but I can't seem to do that with NSTableView - once sorted, always sorted. I'd rather not have a separate button to unsort the data back to its original order, and the natural order of my data does not match any of the data rows, but is the view that most people will want to use most of the time.

I guess if there isn't already something built in, I may have to either subclass something in the table header and make it three state, or maybe override somewhere in the tableview or array controller where it sets the sort descriptors or perhaps turn off the automatically hidden scrollers and put a button in the cornerView... any suggestions or examples would be appreciated.

Thanks

Gideon





_______________________________________________

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

  • Follow-Ups:
    • Re: Removing sorting from NSTableView
      • From: Graham Cox <email@hidden>
  • Prev by Date: Re: NSInteger compare - Help Needed
  • Next by Date: Re: Encrypting data in a Core Data SQL store for a Mac desktop app
  • Previous by thread: Strategy for handling RTFD on iOS
  • Next by thread: Re: Removing sorting from NSTableView
  • Index(es):
    • Date
    • Thread