• 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
NSTableView Binding NSSortDescriptor
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSTableView Binding NSSortDescriptor


  • Subject: NSTableView Binding NSSortDescriptor
  • From: Ben <email@hidden>
  • Date: Fri, 25 Nov 2011 21:21:41 +0000

I have a simple NSTableView which uses  binding and Core Data (via NSArrayController).

It works fine except the order of table entries is random. So I need an NSSortDescriptor. I add a property to my App Delegate like so..

@property (readonly, strong, nonatomic) IBOutlet NSArray *sortDescriptorArray; (plus @synthesize it in the implementation)


In my applicationDidFinishLaunching method I have...


NSSortDescriptor * sd = [[NSSortDescriptor alloc] initWithKey:@"address" ascending:YES];
sortDescriptorArray = [NSArray arrayWithObject:sd];

In IB I select the NSArrayController and bind 'Sort Descriptors' to my App Delegate with 'Model Key Path' as 'sortDescriptorArray'.



I run the App and it still displays the content jumbled up. Any ideas? I'm at a loss…._______________________________________________

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: NSTableView Binding NSSortDescriptor
      • From: Quincey Morris <email@hidden>
  • Prev by Date: Re: Lexical or Preprocessor Issue 'Cocoa/Cocoa.h file not found
  • Next by Date: Re: "byte orders" question
  • Previous by thread: Re: "byte orders" question
  • Next by thread: Re: NSTableView Binding NSSortDescriptor
  • Index(es):
    • Date
    • Thread