Re: NSPredicate and NSString with whitespace gives runtime error

2013-04-22 Thread Koen van der Drift
On Apr 22, 2013, at 12:15 PM, Ben Gollmer wrote: > The problem may be the use of the word "function" in your predicate string. That's it! I changed the name of the attribute to objectFunction, and it works as expected. Thanks, - Koen. ___ Cocoa-de

Re: NSPredicate and NSString with whitespace gives runtime error

2013-04-22 Thread Ben Gollmer
On Apr 22, 2013, at 10:58 AM, Koen van der Drift wrote: > Is there a way I can use an NSPredicate to search an NSString that contains > whitespaces (a sentence)? If I use this: > > NSPredicate *functionPredicate = [NSPredicate predicateWithFormat: > @"function CONTAINS[cd] %@", searchS

NSPredicate and NSString with whitespace gives runtime error

2013-04-22 Thread Koen van der Drift
Is there a way I can use an NSPredicate to search an NSString that contains whitespaces (a sentence)? If I use this: NSPredicate *functionPredicate = [NSPredicate predicateWithFormat: @"function CONTAINS[cd] %@", searchString]; I keep getting a runtime error: 'NSInvalidArgumen