• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSMetadataQuery parsing error
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
  • Follow-Ups:
    • Re: NSMetadataQuery parsing error
      • From: David Masters <email@hidden>
    • Re: NSMetadataQuery parsing error
      • From: mmalcolm crawford <email@hidden>
References: 
 >NSMetadataQuery parsing error (From: Ken Tozier <email@hidden>)
 >Re: NSMetadataQuery parsing error (From: mmalcolm crawford <email@hidden>)

  • Prev by Date: Re: DotMacKit 2.0?
  • Next by Date: Re: NSMetadataQuery parsing error
  • Previous by thread: Re: NSMetadataQuery parsing error
  • Next by thread: Re: NSMetadataQuery parsing error
  • Index(es):
    • Date
    • Thread