Open NSWindowController from NSMenu
问题 I'm with a NSMenu in an agent application (without the icon in the dock) . When a button from this menu is tapped, I want to show a generic NSWindowController. My menu button action: - (IBAction)menuButtonTapped:(id)sender { MyWindowController *myWindow = [[MyWindowController alloc] initWithWindowNibName:@"MyWindowController"]; [myWindow showWindow:nil]; [[myWindow window] makeMainWindow]; } But the window just "flashes" in the screen (it shows and disappears really fast). Any solution? 回答1: