If you want to store the window position in your document, you'll need to store and restore the[window frame]
of the window in question. (That's left as an exercise to the reader, based on how you're storing your document contents.) When restoring the window location, you have to turn ofNSWindowController
's cascading, otherwise it'll honor your width and height, but not your origin. In your document'swindowControllerDidLoadNib
method, you'll need:[[self windowController] setShouldCascadeWindows: NO]; NSWindow *window; window = [self window]; [window setFrame: loadedWindowBounds display: YES];