title: Mac OS X Application modal window does not close
body: <p>I've been trying to submit an application for the Apple App store and the reviewer claims that my initial notice window (which is modal) does not go away when they hit the accept button. Now I've tested it on several machines (even clean 10.7.1 installations) and have not seen this behavior (it works great for me).</p>
  
  <p>My code to display this window:</p>
  
  <pre><code>- (IBAction) doAlert:(id)sender {
      if(self.alertVC == nil) {
          self.alertVC = [[[AlertVC alloc] initWithWindowNibName:@"AlertVC"] autorelease];
      }
      [NSApp runModalForWindow:self.alertVC.window];
  }
  </code></pre>
  
  <p>and the code with which I close it looks like this:</p>
  
  <pre><code>-(IBAction)closeWindow:(id)sender {
      [self close];
      [NSApp stopModal];
  }
  </code></pre>
  
  <p>Anyone have any idea why this works 100% in all my tests but for the Apple testers the window does not go away? (It stays open in the foreground even though the application continues and they can interact with the application as normal again.</p>