Returns a document object created from the contents of a given file and optionally displays it.
- macOS 10.0–10.4Deprecated
NSDocument object created from the contents of the file
file (an absolute path) and displays it if
YES. The returned object is not retained, but is added to the receiver’s list of managed documents. Returns
nil if the object could not be created, typically because
file does not point to a valid file or because there is no
NSDocument subclass for the document type (as indicated by the file extension or HFS file type). Even if
YES, the document is not displayed if
NO. This method calls
make to obtain the created NSDocument object. If you override this method, your implementation should be prepared to handle either
To handle an Open Documents Apple event, the Application Kit’s built-in Apple event handling automatically calls this method with the path to the file to open and a display argument.
Called with a display argument of
YES instead of
NO when a Print Documents Apple event is handled. This may have been handled differently in versions of macOS prior to version 10.3.