I\'m having a very very strange issue here with a NSMenu.
About half the NSMenuItems I use have custom views on them through the setView: method on NSMenuItem. In this c
I had the same problem. Turns out the issue was I was launching an external application after the first menu click, and when the menu was opened again its window was no longer key. Adding this method to the NSView subclass I'n using inside the menu items fixed the problem:
- (void)viewWillMoveToWindow:(NSWindow *)newWindow;
{
[super viewWillMoveToWindow:newWindow];
if ( newWindow != nil && ![newWindow isKeyWindow] )
[newWindow becomeKeyWindow];
[self updateTrackingAreas];
}
For more context, have a look at this link: http://openradar.appspot.com/7128269