makeUntitledDocument(ofType:)
Instantiates a new untitled document of the specified type and returns it if successful.
Declaration
func makeUntitledDocument(ofType typeName: String) throws -> NSDocumentParameters
- typeName:
The type of the document.
Discussion
The document type is specified by typeName. If not successful, the method returns nil after setting outError to point to an NSError object that encapsulates the reason why a new untitled document could not be instantiated. The default implementation of this method calls documentClass(forType:) to find out the class of document to instantiate, then allocates and initializes a document by sending it init(type:).