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
<45rpmli...@googlemail.com> 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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to