• 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
Changes to -makeDocumentWithContentsOfURL:ofType:error: in the last couple of OS releases?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Changes to -makeDocumentWithContentsOfURL:ofType:error: in the last couple of OS releases?


  • Subject: Changes to -makeDocumentWithContentsOfURL:ofType:error: in the last couple of OS releases?
  • From: Rick Mann <email@hidden>
  • Date: Thu, 01 Nov 2012 00:53:11 -0700

I have some old code that would try to open a file using -openDocumentWithContentsOfURL:display:error:, if it existed and if it does not exist, would call -makeDocumentWithContentsOfURL:ofType:error: on that same URL, in an effort to create the missing document.

The code clearly expected to receive a valid document object from the call, but instead it's returning nil and setting the error: Error Domain=NSCocoaErrorDomain Code=260 "The file couldn’t be opened because it doesn’t exist."

Now, maybe this code never worked properly; it's a project I haven't touched in a long time. But has the behavior of this method changed in the last couple of OS releases? I have one of these default documents on disk; I just can't remember if I created with this code or some other means.

What's the difference between -openDocument… and -makeDocument…?

Thanks,

--
Rick




_______________________________________________

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


  • Follow-Ups:
    • Re: Changes to -makeDocumentWithContentsOfURL:ofType:error: in the last couple of OS releases?
      • From: Quincey Morris <email@hidden>
  • Prev by Date: WebPolicyDelegate declared where?
  • Next by Date: Re: Changes to -makeDocumentWithContentsOfURL:ofType:error: in the last couple of OS releases?
  • Previous by thread: Re: WebPolicyDelegate declared where?
  • Next by thread: Re: Changes to -makeDocumentWithContentsOfURL:ofType:error: in the last couple of OS releases?
  • Index(es):
    • Date
    • Thread