When I launch my app in OSX Lion, it always runs on the bottom layer, behind other apps.
I suspect the issue is related to the new feature in Lion about restoring the last configuration of the main window. Indeed, if I delete the app folder from the Library/Saved Application State folder, and I run again my app, the main window is displayed on top.
Also, if I click on the dock bar, the apps come in front, but it never starts in front of other apps.
I’ve tried several things such as:
- clean the AutoSave field in the xib file
- setLevel:NSNormalWindowLevel (if I use NSSubmenuWindowLevel, it stays always in front even when it looses focus)
- [window makeKeyAndOrderFront:self]
but none had worked.
I don’t know if this matters, but my base xib file in the app preferences is “mainMenu.xib” and not “document.xib”. COuld be that the mainWindow is considered the main application window and therefore not shown on top ?
In any case I think there is something wrong in the code, because the app should show up on top of the window when it is launched by default.
Thanks
I’ve solved by disabling the Resume with