Use NSWindowController.