Re: NSPredicate containing contains
Re: NSPredicate containing contains
- Subject: Re: NSPredicate containing contains
- From: Keary Suska <email@hidden>
- Date: Wed, 28 May 2008 14:24:17 -0600
- Thread-topic: NSPredicate containing contains
5/28/08 1:52 PM, also sprach email@hidden:
> NSString *predicateFormat = @"%@ contains %K";
> NSPredicate *predicate = [NSPredicate predicateWithFormat:
> predicateFormat, searchString, kMDItemFSName];
See my follow-up--I had the arguments backwards. I am surprised that the
above works, but I can see that it could possibly.
> NSString *predicateFormat = @"%@ contains kMDItemFSName";
> NSPredicate *predicate = [ NSPredicate predicateWithFormat:
> predicateFormat, searchString ];
This shouldn't work at all--it may not generate an error, but it shouldn't
find anything, AFAICT.
Best,
Keary Suska
Esoteritech, Inc.
"Demystifying technology for your home or business"
_______________________________________________
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