• 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: How to cancel a loading document in NSDocument's readFromURL:ofType:error method ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to cancel a loading document in NSDocument's readFromURL:ofType:error method ?


  • Subject: Re: How to cancel a loading document in NSDocument's readFromURL:ofType:error method ?
  • From: Mike Abdullah <email@hidden>
  • Date: Thu, 09 Feb 2012 22:53:47 +0000

On 9 Feb 2012, at 20:23, Gilles Celli wrote:

> Mike, Kyle,
>
> Thanks for the quick answers!
>
> Yes I'm targeting Mac OS X 10.6 and later so canConcurrentlyReadDocumentsOfType: is a welcome addition, I completely forgot that.
>
> Strangely if I put the method canConcurrentlyReadDocumentsOfType: inside my NSDocument I get a warning when trying to open a document (It seems to be a QuickLook error ?) on Mac OS X 10.7.3:
>
> [QL] QLError(): +[QLSeamlessDocumentOpener seamlessDocumentOpenerForURL:] should only be called in the main thread

Maybe try setting a breakpoint on QLError to see when it gets called?
>
> Now for the cancel question: If I take the more traditional approach to cancel the operation inside readFromURL, should I fire up a new thread to check the flag's status ?

What would this gain you? You set the cancel flag on the main thread. And you have a worker thread for reading the document supplied by the system, so why add another thread to the mix?


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


  • Follow-Ups:
    • Re: How to cancel a loading document in NSDocument's readFromURL:ofType:error method ?
      • From: Gilles Celli <email@hidden>
References: 
 >How to cancel a loading document in NSDocument's readFromURL:ofType:error method ? (From: Gilles Celli <email@hidden>)
 >Re: How to cancel a loading document in NSDocument's readFromURL:ofType:error method ? (From: Kyle Sluder <email@hidden>)
 >Re: How to cancel a loading document in NSDocument's readFromURL:ofType:error method ? (From: Gilles Celli <email@hidden>)

  • Prev by Date: Re: drawing 1 bit images, and image resolution
  • Next by Date: Re: Clipping a CAGradientLayer with a duplicated CAShapeLayer (don't)
  • Previous by thread: Re: How to cancel a loading document in NSDocument's readFromURL:ofType:error method ?
  • Next by thread: Re: How to cancel a loading document in NSDocument's readFromURL:ofType:error method ?
  • Index(es):
    • Date
    • Thread