Instantiates a document located by a URL, of a specified type, and returns it if successful.
- macOS 10.4+
The location of the new document object.
The type of the document.
On return, an error if the document could not be created, otherwise
The newly created
NSDocument object, or
nil if the document could not be created.
The URL is specified by
absolute and the document type by
type. If not successful, the method returns
nil after setting
out to point to an NSError that encapsulates the reason why the document could not be instantiated. The default implementation of this method calls
document to find out the class of document to instantiate, allocates a document object, and initializes it by sending it an