Re: NSMetadataQuery parsing error
Re: NSMetadataQuery parsing error
- Subject: Re: NSMetadataQuery parsing error
- From: Ken Tozier <email@hidden>
- Date: Sat, 2 Jul 2005 06:27:44 -0400
On Jul 2, 2005, at 5:18 AM, mmalcolm crawford wrote:
[query setPredicate: [NSPredicate predicateWithFormat:
@"(kMDItemDisplayName = '*.jpg'cd) && (kMDItemContent !=
com.apple.mail.emix) && (lMDItemContent != public.vcard)"]];
->
[NSPredicate predicateWithFormat: @"(kMDItemDisplayName like[cd]
'*.jpg') && (kMDItemContent != com.apple.mail.emix) &&
(kMDItemContent != public.vcard)"]
Thanks. mmalc
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 "
2005-07-02 06:11:35.028 InterfaceEditor[5830] An uncaught exception
was raised
2005-07-02 06:11:35.029 InterfaceEditor[5830] NSComparisonPredicate
with right expression which is not NSConstantValueExpressionType
given to NSMetadataQuery (kMDItemContent != com.apple.mail.emix)
2005-07-02 06:11:35.030 InterfaceEditor[5830] *** Uncaught exception:
<NSInvalidArgumentException> NSComparisonPredicate with right
expression which is not NSConstantValueExpressionType given to
NSMetadataQuery (kMDItemContent != com.apple.mail.emix)
I was able to add other query sections like additional name
constraints "(kMDItemDisplayName != 'flag')" etc. But NSPredicate
seems to have a problem with "com.apple.mail.emix" and "public.vcard"
any ideas?
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