Instance Property


Returns the document window to use as the parent of a document-modal sheet.


@property(readonly, strong) NSWindow *windowForSheet;


This method searches the document's window controllers for the most suitable window to use when displaying the sheet.

The value of this property may be nil, in which case the sender should present an app-modal panel. The NSDocument implementation of this property sets the value to the window of the first window controller, or [NSApp mainWindow] if there are no window controllers or if the first window controller has no window.

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 outlet of this document to the specified value.


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

- setDisplayName:

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

- defaultDraftName

Returns the default draft name for the document subclass.

- encodeRestorableStateWithCoder:backgroundQueue:

Saves the interface-related state of the document.