Instance Property

displayName

The name of the document as displayed in the title bars of the document’s windows and in alert dialogs related to the document.

Declaration

@property(copy) NSString *displayName;

Discussion

If the document has been saved, the display name is the last component of the directory location of the saved file (for example, “MyDocument” if the path is “/tmp/MyDocument.rtf”). If the document is new, NSDocument makes the display name “Untitled n

,” where n is a number in a sequence of new and unsaved documents. The displayable name also takes into account whether the document’s filename extension should be hidden. Subclasses of NSWindowController can override windowTitleForDocumentDisplayName: to modify the display name as it appears in window titles.

See Also

Managing Document Windows

- showWindows

Displays all of the document’s windows, bringing them to the front and making them main or key as necessary.

- setWindow:

Sets the window Interface Builder outlet of this class.

windowForSheet

The most appropriate window (of the windows associated with the document) to use as the parent window of a document-modal sheet.

- setDisplayName:

Sets the name of this document for presentation to the user.

- defaultDraftName

Returns the default draft name for the receiving subclass of NSDocument.