One Quickie

Window Position Autosave for NSWindowController-owned inspectors (NSDocument->NSWindow)
It's nice to autosave the position of inspector windows so that they come backup where the user put them. Unfortunately, NSWindowController wipes out the autosave name that's set in Interface Builder. You have to set it in code in your window controller subclass. The windowDidLoad method (which is used instead of awakeFromNib) is a handy place:
- (void) windowDidLoad
    [super windowDidLoad];

    [self setShouldCascadeWindows: NO];
    [self setWindowFrameAutosaveName: @"pannerWindow"];

    // and any other windowDidLoad work to be done
} // windowDidLoad

borkware home | products | miniblog | rants | quickies | cocoaheads
Advanced Mac OS X Programming book