• 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 can not be synchronous ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSMetadataQuery can not be synchronous ?


  • Subject: Re: NSMetadataQuery can not be synchronous ?
  • From: Scott Anguish <email@hidden>
  • Date: Fri, 20 May 2005 04:08:04 -0400


On May 20, 2005, at 4:00 AM, Aurélien Hugelé wrote:

Hi list !

most of my code is currently using MDQueryRef. I have a crash somewhere in MDQueryExecute() with very few informations. I suspect an Apple bug, but i'm not sure...

Trying to fix my bug, i want to use NSMetadataQuery instead of low level MDQueryRef (because i'm maybe doing something wrong ?)
with MDQueryRef, you can  make the query synchronous, i mean block until all results are found, using
    if( !MDQueryExecute(outboxQuery,kMDQuerySynchronous)) // /*kMDQueryWantsUpdates if you want asynchronous mode*/

    NSMetadataQuery is built on top of MDQuery, so you'll not gain anything significant by using NSMetadataQuery.


but AFAIK Cocoa's higher level NSMedataQuery API does not offer this choice, it seems that you can only use asynchronous mode !?

    that is correct.


am i wrong ? why do Apple limit our possibilities here ?

    No possibilities limited.. You can use MDQuery directly instead.  

I know that asynchronous is generally better design, but it depends...


 _______________________________________________
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 can not be synchronous ? (From: Aurélien Hugelé <email@hidden>)

  • Prev by Date: Re: Accessing MP3 and AAC album art
  • Next by Date: CoreData: How to do Transient Entities?
  • Previous by thread: NSMetadataQuery can not be synchronous ?
  • Next by thread: Re: NSMetadataQuery can not be synchronous ?
  • Index(es):
    • Date
    • Thread