• 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
Sorting an NSTableView by code
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Sorting an NSTableView by code


  • Subject: Sorting an NSTableView by code
  • From: Drarok Ithaqua <email@hidden>
  • Date: Fri, 30 Jun 2006 00:35:56 +0100

First, apologies if this was answered recently. I'm sure there was something at least similar, but I'm not seeing it in the archive...

I'm loading a whole load of files into an NSArrayController (each file is represented by an NSDictionary).
I can load, and display, all the data fine. But I'd like to automatically present it sorted after the load.
I've tried the following (and variants similar to the following) to no avail:


NSSortDescriptor* sorter = [[NSSortDescriptor alloc] initWithKey:@"tvcArtist" ascending:YES];
[trackController setSortDescriptors:[NSArray arrayWithObject:sorter]];


tvcArtist is the Identifier set in IB against the tableView's column (tvc = Table View Column),
but I'm stuck - it doesn't sort. Nor does it if I call [tableView setSortDescrip....


Can someone point me in the right direction?

Many thanks,

 - Drarok
_______________________________________________
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


  • Prev by Date: Re: Distributed Objects and Bonjour
  • Next by Date: Re: [Q] Project templates for the Eclipse?
  • Previous by thread: Re: [Q] Project templates for the Eclipse?
  • Next by thread: Re: Sorting an NSTableView by code
  • Index(es):
    • Date
    • Thread