I have an NSStatusItem that is properly displaying in the MenuBar. One of the items (when clicked) displays a modal NSWindow from my application, which is meant
NSStatusItem
You can try something like:
... if ([NSApp isHidden]) [myWindow makeKeyAndOrderFront:self]; else [NSApp runModalForWindow:myWindow]; ...
and when finish:
... if ([NSApp isHidden]) [myWindow orderOut:self]; else [NSApp stopModal]; ...