title: NSRunAlertPanel shows up behind the "active window"
body: <p>I'm trying to put together a simple error reporting package. If my main program crashes, it saves a crashlog, then starts a reporter program. The reporter program asks the user if it can send the crash log to me, then does so. I'm using NSRunAlertPanel to create a basic message box.</p>
  
  <p>For some reason, that message box is showing up buried underneath any other windows that may be open. Run the main package from a Finder window, it shows up on top, force it to crash, the reporter window shows up <em>behind</em> the Finder window.</p>
  
  <p>Why is this happening, and how can it be solved?</p>
  
  <p>Minimal test case:</p>
  
  <pre><code>#import &lt;AppKit/AppKit.h&gt;
  
  int main(int a, char* av) {
    NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
    NSApplication* q = [[NSApplication alloc] init]; 
    NSRunAlertPanel(@"Hello", @"Aloha", @"OK", nil,nil);
    [pool release];
  } 
  </code></pre>
  
  <p>Built with:</p>
  
  <pre><code>g++ test.mm -framework AppKit &amp;&amp; ./a.out
  </code></pre>