In project with ARC we must announce a variable windowController
outside the method loadMyWindow
NSWindowController *windowController; //for example here
- (IBAction)loadMyWindow:(id)sender
{
if (windowController == nil) {
windowController = [[NSWindowController alloc] initWithWindowNibName:@"myWindow"];
[windowController window];
}
}