NSView in NSMenu -- how to make "key" for accepting keyboard commands [specifically, return]
I have a text field and a button living in a view inside a menu item. The button submits the string in the text field to a function, and that works fine. However, I've also set the button's key equivalent to "return." The key command isn't being picked up, prob开发者_如何学Pythonably because the menu is not the "key" window.
I know how to make a window the key window (makeKeyAndOrderFront) -- what's the equivalent for a view living in a menu?
精彩评论