• 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
NSMetadataQuery parsing error
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: NSMetadataQuery parsing error
      • From: mmalcolm crawford <email@hidden>
  • Prev by Date: Re: Enable Buttons
  • Next by Date: Re: NSMetadataQuery parsing error
  • Previous by thread: Re: DotMacKit 2.0?
  • Next by thread: Re: NSMetadataQuery parsing error
  • Index(es):
    • Date
    • Thread