• 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: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


References: 
 >NSMetadataQuery parsing error (From: Ken Tozier <email@hidden>)
 >Re: NSMetadataQuery parsing error (From: mmalcolm crawford <email@hidden>)
 >Re: NSMetadataQuery parsing error (From: Ken Tozier <email@hidden>)
 >Re: NSMetadataQuery parsing error (From: mmalcolm crawford <email@hidden>)

  • Prev by Date: Re: NSMetadataQuery parsing error
  • Next by Date: Help Anchors
  • Previous by thread: Re: NSMetadataQuery parsing error
  • Next by thread: Re: NSMetadataQuery parsing error
  • Index(es):
    • Date
    • Thread