Instance Method

restoreStateWithCoder:

Restores the interface-related state of the document.

Declaration

- (void)restoreStateWithCoder:(NSCoder *)coder;

Parameters

coder

The coder object to use to restore the document’s interface-related state.

Discussion

This method is part of the window restoration system and is called at launch time to restore the window-related state of your document object. The default implementation restores some basic information about the document. If you override this method, you must call super at some point in your implementation.

Subclasses can override this method and use it to restore the document-related information that was saved in the encodeRestorableStateWithCoder: method. You can also use this method to reconfigure the document (or its associated window controller and window) to their previous appearance.

For information about using a coder object to read data from an archive, see Archives and Serializations Programming Guide.

See Also

Handling Window Restoration

- encodeRestorableStateWithCoder:

Saves the interface-related state of the document.

restorableStateKeyPaths

Returns an array of key paths representing the restorable attributes of the document.

- invalidateRestorableState

Marks the document’s interface-related state as dirty.

- restoreDocumentWindowWithIdentifier:state:completionHandler:

Restores a window that was associated with a document, after that document is reopened.