openDocumentWithContentsOfURL:display:
Returns a document object created from the contents of a given URL and optionally displays it.
Declaration
- (id) openDocumentWithContentsOfURL:(NSURL *) url display:(BOOL) display;Discussion
Returns an NSDocument object created from the contents of aURL and displays it if flag is true. 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 aURL does not point to a valid location or because there is no NSDocument subclass for the document type. Even if flag is true, the document is not displayed if shouldCreateUI returns false. This method calls makeDocumentWithContentsOfURL:ofType: to obtain the created NSDocument object.
See Also
Deprecated Methods
documentForFileName:fileExtensionsFromType:fileNamesFromRunningOpenPanelmakeUntitledDocumentOfType:makeDocumentWithContentsOfURL:ofType:makeDocumentWithContentsOfFile:ofType:openDocumentWithContentsOfFile:display:openDocumentWithContentsOfURL:display:error:openUntitledDocumentOfType:display:reopenDocumentForURL:withContentsOfURL:error:setShouldCreateUI:shouldCreateUItypeFromFileExtension: