Описание тега nsdocumentcontroller

An NSDocumentController object manages an application's document.It is available Apple's AppKit framework. This [tag:NSDocumentController] can be tagged with issues related with opening documents etc using NSDocumentController. Available in Mac OS X v10.0 and later.

An NSDocumentController instance is an administrator of a document-based application. It is responsible for servicing user requests to create, open, and save documents. NSDocumentController serves the integral role of the document factory. NSDocument knows how to load a file's contents as the document's data, and NSDocumentController knows how to create NSDocument objects under different circumstances.

From apple Official document:

An NSDocumentController object manages an application’s documents. As the first-responder target of New and Open menu commands, it creates and opens documents and tracks them throughout a session of the application. When opening documents, an NSDocumentController runs and manages the modal Open panel. NSDocumentController objects also maintain and manage the mappings of document types, extensions, and NSDocument subclasses as specified in the CFBundleDocumentTypes property loaded from the information property list (Info.plist).

You can use various NSDocumentController methods to get a list of the current documents, get the current document (which is the document whose window is currently key), get documents based on a given filename or window, and find out about a document’s extension, type, display name, and document class.

Source: NSDocumentController class reference

Related tags: