How to cancel a loading document in NSDocument's readFromURL:ofType:error method ?
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