• 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
Re: Set NSTableColumn Arrow up/down
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Set NSTableColumn Arrow up/down


  • Subject: Re: Set NSTableColumn Arrow up/down
  • From: Kevin Hoctor <email@hidden>
  • Date: Fri, 2 Mar 2007 10:17:02 -0600

On Mar 2, 2007, at 9:56 AM, Jerry Krinock wrote:

I have no idea how you managed to get two arrows up there. But since you
asked for the "right way", I will give you my code. I don't know if it's
"right", but it does work:

I've never had to write as much code as you showed Jerry. If you have a KVC compliant application, all you have to do is sort the information in the controller:


NSSortDescriptor *listSort = [[NSSortDescriptor alloc] initWithKey:@"date" ascending:YES];
[transactionController setSortDescriptors:[NSArray arrayWithObject:listSort]];
[listSort release];


The visual changes on the NSTableView come for free with this sort of the data.

Peace,

Kevin Hoctor
email@hidden
No Thirst Software LLC
http://nothirst.com



_______________________________________________

Cocoa-dev mailing list (email@hidden)

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


References: 
 >Re: Set NSTableColumn Arrow up/down (From: Jerry Krinock <email@hidden>)

  • Prev by Date: Re: Set NSTableColumn Arrow up/down
  • Next by Date: Re: Unfathomable CIImage - Really get crazy about it
  • Previous by thread: Re: Set NSTableColumn Arrow up/down
  • Next by thread: How do I load my data on application startup
  • Index(es):
    • Date
    • Thread