NSMetadataQuery parsing error
NSMetadataQuery parsing error
- Subject: NSMetadataQuery parsing error
- From: Ken Tozier <email@hidden>
- Date: Sat, 2 Jul 2005 04:21:07 -0400
I'm trying to get my first NSMetadataQuery working and am getting the
error "Unable to parse the format string "(kMDItemDisplayName =
'*.jpg'cd) && (kMDItemContent != com.apple.mail.emix) &&
(lMDItemContent != public.vcard)" for a query copied directly from
the Finder, as suggested in the Predicates programming guide.
Heres the relevant code:
NSMetaDataQuery *query = [[NSMetadataQuery alloc] init];
[query setPredicate: [NSPredicate predicateWithFormat:
@"(kMDItemDisplayName = '*.jpg'cd) && (kMDItemContent !=
com.apple.mail.emix) && (lMDItemContent != public.vcard)"]];
Running the app yeilds the error info in the run log:
[Session started at 2005-07-02 04:15:13 -0400.]
2005-07-02 04:15:13.901 QueryTestApp[5568] An uncaught exception was
raised
2005-07-02 04:15:13.902 QueryTestApp[5568] Unable to parse the format
string "(kMDItemDisplayName = '*.jpg'cd) && (kMDItemContent !=
com.apple.mail.emix) && (kMDItemContent != public.vcard)"
2005-07-02 04:15:13.902 QueryTestApp[5568] *** Uncaught exception:
<NSInvalidArgumentException> Unable to parse the format string
"(kMDItemDisplayName = '*.jpg'cd) && (kMDItemContent !=
com.apple.mail.emix) && (kMDItemContent != public.vcard)"
Anyone see the problem?
Thanks
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