• 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
Multiple NSSortDescriptors on NSTableColumn header click
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Multiple NSSortDescriptors on NSTableColumn header click


  • Subject: Multiple NSSortDescriptors on NSTableColumn header click
  • From: Sebastian Morsch <email@hidden>
  • Date: Thu, 13 Oct 2005 00:28:39 +0200

Hi,

my first post so - hello everybody! (Thanks for the archives, great help!)

I have a little question about sorting an NSTableView. It's bound to an NSArrayController wich is bound to a CoreData entity. What I'd like to implement is a behaviour similar to iTunes' "Album"-column, which doesn't only sort by album name but by album name, cd number and track number alltogether, with one click on the column header.

I know, NSTableView holds an array of multiple NSSortDescriptors that commands the sort order. I tried tableView:sortDescriptorsDidChange: and tableView:didClickTableColumn: to influence the sortDescriptors- array, but I couldn't make it work properly. If I change it in these methods, the table seems to sort two times in a row, which looks nasty. So my question: Is there another way to handle this?

Unfortunately, the archive pages seem down these days, so I'm not sure, if something like this was posted before... however, it would be great if someone could help me out on this. Thanks a lot!

Baiste
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Multiple NSSortDescriptors on NSTableColumn header click
      • From: Sebastian Morsch <email@hidden>
  • Prev by Date: Re: CFSocketCopyPeerAddress returns nil for connected UDP socket
  • Next by Date: Making all components in path
  • Previous by thread: Localizing a Managed Object Model
  • Next by thread: Re: Multiple NSSortDescriptors on NSTableColumn header click
  • Index(es):
    • Date
    • Thread