Re: NSDocument fileURL
Re: NSDocument fileURL
- Subject: Re: NSDocument fileURL
- From: Graham Cox <email@hidden>
- Date: Fri, 24 Jan 2014 11:49:34 +1100
On 24 Jan 2014, at 8:12 am, Pax <email@hidden> wrote:
> Later (in windowControllerDidLoadNib), I try to get the file path - but I turn up a blank (it returns null):
>
> NSLog(@"%@",[self fileURL]);
>
> Very strange. And yet the file does get processed correctly - it's just that I can't display all the useful information that I'd like to be able to display.
The fileURL should normally be valid at this point.
It gets set during the call to -initWthContentsOfURL:ofType:error. If you've overridden that method, you'll need to call -setFileURL: yourself (or super). At the moment it's the only thing I can think of, though NSDocument is pretty complicated these days, with many pitfalls.
-Graham
_______________________________________________
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