My app have Preferences window. I open it using this code
- (IBAction)openPreferences:(id)sender {
NSWindowController *windowController = [[NSWindowController alloc] initWithWindowNibName:@"Preferences"];
[windowController window];
}
If press command, again-again and again new Preferences window will be opened again-again and again…
How open only one window? Thanks!
Make windowController a instance variable of your AppDelegate and change your open preferences to