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

NSArrayControler


  • Subject: NSArrayControler
  • From: Neto <email@hidden>
  • Date: Sun, 28 May 2006 19:12:44 -0300

Hi.

I'm a newbie at Cocoa and I searched the list without success...so if someone could help...I think its pretty easy what I need...

I have a NSArrayController with two columns: Date and Name.

I need to sort by date and make only the most recent ten entries shown.

I was able to sort with:

NSSortDescriptor* aSortDesc = [[NSSortDescriptor alloc] initWithKey:@"gdate" ascending:NO];
[myArrayController setSortDescriptors:[NSArray arrayWithObject:aSortDesc]];


But how do I get only the last 10 entries?

I tried to use NSPredicate with @"count" but I can't figure out how to define the last ten entries using predicateWithFormat...

Thanks!

neto
_______________________________________________
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: NSArrayControler
      • From: mmalcolm crawford <email@hidden>
References: 
 >NSScanner:nil string argument (From: Denise Eatherly <email@hidden>)

  • Prev by Date: NSScanner:nil string argument
  • Next by Date: propertyListFromData: actually returns mutable objects?
  • Previous by thread: NSScanner:nil string argument
  • Next by thread: Re: NSArrayControler
  • Index(es):
    • Date
    • Thread