nsrunalertpanel

NSRunAlertPanel shows up behind the “active window”

回眸只為那壹抹淺笑 提交于 2019-12-22 18:50:55
问题 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. 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

NSRunAlertPanel shows up behind the “active window”

北城余情 提交于 2019-12-06 08:39:58
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. 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 behind the Finder window. Why is this happening, and how can it be solved? Minimal test case: #import