• 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
Re: NSDocument fileURL
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >NSDocument fileURL (From: Pax <email@hidden>)

  • Prev by Date: Re: File association using file magic
  • Next by Date: Re: Non-breaking hyphen in UILabel?
  • Previous by thread: NSDocument fileURL
  • Next by thread: Re: Non-breaking hyphen in UILabel?
  • Index(es):
    • Date
    • Thread