Re: CoreData Fetch Request Failing When Using NSDate in NSPredicate
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