Re: NSMetadataQuery parsing error
Re: NSMetadataQuery parsing error
- Subject: Re: NSMetadataQuery parsing error
- From: Ken Tozier <email@hidden>
- Date: Sat, 2 Jul 2005 06:54:35 -0400
On Jul 2, 2005, at 6:44 AM, mmalcolm crawford wrote:
On Jul 2, 2005, at 3:27 AM, Ken Tozier wrote:
[NSPredicate predicateWithFormat: @"(kMDItemDisplayName like[cd]
'*.jpg') && (kMDItemContent != com.apple.mail.emix) &&
(kMDItemContent != public.vcard)"]
I can get it working if I omit "&& (kMDItemContent !=
com.apple.mail.emix) && (kMDItemContent != public.vcard)" from the
predicate but if either (or both) of these are included, it spits
out the error [...]
NSPredicate *predicate = [NSPredicate predicateWithFormat:
@"(kMDItemDisplayName like[cd] '*.jpg') && (kMDItemContent !=
'com.apple.mail.emix') && (kMDItemContent != 'public.vcard')"];
That's the ticket. They need to be quoted.
The predicate documentation at the bottom of the page, here "http://
developer.apple.com/documentation/Cocoa/Conceptual/Predicates/
index.html#//apple_ref/doc/uid/TP40001789" shows them unquoted.
Candidate for a documentation bug?
Ken
_______________________________________________
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