Re: Getting filename in NSDocument readFromData
Re: Getting filename in NSDocument readFromData
- Subject: Re: Getting filename in NSDocument readFromData
- From: Pascal Harris <email@hidden>
- Date: Thu, 29 Apr 2010 20:13:11 +0100
Sometimes, I find, I get so fixated on one particular solution that I
can't see the wood for the trees. Thanks for your response though -
it did, at least get me thinking.
So, if anyone else has the same (slightly numpty) query, the answer is
to forget NSData - remember that we're talking about an NSDocument
window. So [self fileURL] will provide the answer. Sorry for wasting
your time!
-Pascal
On 28 Apr 2010, at 19:40, Kyle Sluder wrote:
On Wed, Apr 28, 2010 at 11:37 AM, Pascal Harris
<email@hidden> wrote:
How do I get the filename of the source document when using
NSDocument readFromData?
Just override -readFromURL:ofType:error: instead. The documentation is
quite clear about this method's implementation simply being a wrapper
around -readFromFileWrapper:ofType:error, which in turn is documented
to just be a wrapper for -readFromData:ofType:error:.
--Kyle Sluder
_______________________________________________
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