• 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
Custom compare: for NSDate sort descriptor
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Custom compare: for NSDate sort descriptor


  • Subject: Custom compare: for NSDate sort descriptor
  • From: George Orthwein <email@hidden>
  • Date: Mon, 8 Oct 2007 19:07:16 -0400

This seems like a basic question but my searches aren't helping...

I have a table column with NSDate values. I simply want to sort "blank" dates AFTER the last date rather than before the earliest date (which is the behavior of the standard compare:).

From what I can tell, the best route would be to add a category to NSDate and implement a custom compare: method?

Or I suppose I could make an NSDate subclass to put the custom compare:? However, it's a Core Data attribute so I'm not sure if that makes it difficult or not.

Just wondering if there is a standard approach before I spend time on either of the above.

My mind is a bit of spaghetti right now having run into several roadblocks today so I apologize if I'm overlooking something obvious.

Thanks!
George


_______________________________________________

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: Custom compare: for NSDate sort descriptor
      • From: Keary Suska <email@hidden>
  • Prev by Date: Re: Core Data: rare exception
  • Next by Date: Re: [question] Checking for duplicate entries in NSMutableArray
  • Previous by thread: Re: MEETING: Chicago CocoaHeads / CAWUG - Scripting CoreData - Tuesday October 9th 7:00 PM
  • Next by thread: Re: Custom compare: for NSDate sort descriptor
  • Index(es):
    • Date
    • Thread