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

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


  • Subject: How to cancel a loading document in NSDocument's readFromURL:ofType:error method ?
  • From: Gilles Celli <email@hidden>
  • Date: Thu, 09 Feb 2012 17:01:08 +0100

Hi,

I searched the mailing-list but didn't find an answer….so sorry if this was posted before:

I've setup a document based application which can read large ASCII data files (>150MB).

When opening the document the method readFromURL:ofType:error is used which then opens a small feedback window
showing the file name and an animated  progress bar with a "Cancel" NSButton.

Simple question: How do I cancel the document when it is loading the data (sometimes it can take 10 seconds or more to load the data) if a user clicks the Cancel button  ?
Should I create an IBAction which generates an NSError ?
But how does readFromURL:ofType:error get this error message (should I use a delegate ?)

Any clue is greatly appreciated.

Cheers,

Gilles


_______________________________________________

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: Kyle Sluder <email@hidden>
    • Re: How to cancel a loading document in NSDocument's readFromURL:ofType:error method ?
      • From: Mike Abdullah <email@hidden>
  • Prev by Date: Re: Can I somehow encourage the deallocation of a dismissed view controller?
  • Next by Date: Re: drawing 1 bit images, and image resolution
  • Previous by thread: This game is not recognized by Game Center
  • Next by thread: Re: How to cancel a loading document in NSDocument's readFromURL:ofType:error method ?
  • Index(es):
    • Date
    • Thread