Hello everybody,
I'm working on a new Mac App and want to open my Preferences Window, i've got 2 Nib (xib) Files, one for the main window, and one for the Preferences Window, then i've got a openPreferences Action, which shows the Preferences Window, sth. like this:
- (IBAction)openPreferences:(id)sender
{
PrefCont *cont = [[PrefCont alloc] init];
[cont showWindow:self];
}
this code works, but when i click more then once on the open Preferences Menu Item, then the Preferences Window opens twice or more then twice.
Is there a posibility to make it with sth. like makeKeyAndOrderFront but it must be called by the PrefController?
Or can i ask the Mac if the Window is opened? if not, then show it or sth. link this.
This would be very helpful, thanks to everbody!