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

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

Reply via email to