• 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: CoreData Fetch Request Failing When Using NSDate in NSPredicate
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CoreData Fetch Request Failing When Using NSDate in NSPredicate


  • Subject: Re: CoreData Fetch Request Failing When Using NSDate in NSPredicate
  • From: Jim Correia <email@hidden>
  • Date: Wed, 23 Nov 2005 09:40:21 -0500

On Nov 23, 2005, at 9:36 AM, Diederik Hoogenboom wrote:

On 22-nov-2005, at 21:46, David Garcea wrote:

NSPredicate *dateInLast30DaysPredicate = [NSPredicate predicateWithFormat:@"%@ > %@", propertyName, date30DaysAgo];

I think the format string should be @"%K > %@", otherwise it will just compare strings.

Indeed - I was sloppy about pasting your example into my test program. I replaced the first format char with a literal for a key defined in my model.


<http://developer.apple.com/documentation/Cocoa/Conceptual/Predicates/ Articles/pSyntax.html>

As for your object doesn't respond to selector problem, your best bet there is to still stop in the debugger, look at the stack, and work backwards from there. (You may have memory management problems, and are messaging zombie objects - but a new object now occupies that slot in memory.)

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


References: 
 >CoreData Fetch Request Failing When Using NSDate in NSPredicate (From: David Garcea <email@hidden>)
 >Re: CoreData Fetch Request Failing When Using NSDate in NSPredicate (From: Diederik Hoogenboom <email@hidden>)

  • Prev by Date: Re: Custom NSView in IB palette
  • Next by Date: Re: Custom NSView in IB palette
  • Previous by thread: Re: CoreData Fetch Request Failing When Using NSDate in NSPredicate
  • Next by thread: [ANN] Lingon 1.0
  • Index(es):
    • Date
    • Thread