Multiple NSSortDescriptors on NSTableColumn header click
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