I had problems with this in the past. I was able to resolve this by first โignoringโ other applications, and then making it a key window. Take a picture and see if it works for you.
[NSApp activateIgnoringOtherApps:YES]; [[self window]makeKeyAndOrderFront:self];
Also try setting the window level of NSPopUpMenuWindowLevel during initialization.
[[self window]setLevel:NSPopUpMenuWindowLevel];
I also had problems loading nib files on Mac OS X. They load "lazily", which means that they will not be initialized until they are needed. This causes a problem when you want to set specifics in a window, but you cannot, because awakeFromNib does not seem to be called due to lazy loading of nib. To fix this, here is what I have done in the past. In your deletet (or wherever you initialize your window), start the window in action by accessing the window property in the initialized class:
wc = [[blah alloc]initWithWindowNibName:NSStringFromClass([blah class])]; (void)[wc window];
This way you force the nib to be initialized. Thus, when the user clicks the menu icon, the thread is already initialized, and awakeFromNib already called.
sudo rm -rf
source share