I encountered the same problem while working on chapters 12 (Nib Files and NSWindowController) in Aaron Hillegass Cocoa for Mac OS X. The Doug answer above was the solution - I did not link the window of the owner of the Preferences.xib file to the window itself (in this case the Panel window (Preferences)).
I right-clicked on “File Owner” in the Preferences.xib file, then left-clicked the mouse from the window into the (Preferences) panel. After execution and rebuilding, the application worked as intended. I could close and reopen the user settings panel, and my previous settings were still there (since the settings window was not unloaded, it was just hidden).
source share