Closing the NSPanel issue <p>very unusual problem i'm getting if i press the close button of panel, panel closes but when i press a custom button and calls this close function panel doesn't close. If i mark a breakpoint in close function and continue with execution then panel gets close...i'm confused. why panel doesn't close on normal execution but closes when i mark breakpoint and continue it? </p> <pre><code>NSRect panelRect = NSMakeRect(100, 100, 530, 400); RecordsListingViewController* listController = [[RecordsListingViewController alloc] initWithContentRect:panelRect styleMask:NSTitledWindowMask | NSClosableWindowMask | NSUtilityWindowMask backing:NSBackingStoreBuffered defer:YES]; NSUInteger modelInt = [[NSApplication sharedApplication] runModalForWindow:listController]; - (void)close { ///[self stop]; [[NSApplication sharedApplication] stopModal]; [super close]; } </code></pre>