Hello,
I am dabbling with making a sort of on-screen menu that appears above other windows.
It contains a window for each menu item - and these windows are semi-transparent panels based off the 'roundTransparentWindow' sample code:
http://developer.apple.com/samplecod...entWindow.html
So far, so good.
However I would like the panels to accept keyDown: events. Which I can't seem to get them to do. They accept Mouse events - but not key events.
I have added the necessary FirstResponder methods to the window's main view - and they sort of work - as you can see from the output below:
The first time each window appears it's view Accepts FirstResponder and Becomes FirstResponder.
After that though (last few lines) - it accepts FirstResponder (when I click on the window) - but does not ever become FirstResponder.
If I try to type then I get a system beep - and no keyboard events are caught by any of the views.
Does anyone have any ideas why the Panels will not accept key input?
I suspect either it has something to do with either the panel being initWithContentRect:aRect styleMask:NSBorderlessWindowMask | NSNonactivatingPanelMask
or [panel setLevel:NSStatusWindowLevel];
below is the code:
Output when Run:
Code:
[Session started at 2005-01-27 11:56:36 +0000.]
MoreBezels[4684]: ICeCoffEE APE: Can't get process serial number for current process (error 1011); not loading in this application
2005-01-27 11:56:37.466 MoreBezels[4684] The AppController has awokenFromNib.
2005-01-27 11:56:37.619 MoreBezels[4684] G4 TV Channel Selector Accepts First Responder
2005-01-27 11:56:37.619 MoreBezels[4684] G4 TV Channel Selector Accepts First Responder
2005-01-27 11:56:37.619 MoreBezels[4684] G4 TV Channel Selector Become First Responder
2005-01-27 11:56:37.676 MoreBezels[4684] G4 TV Channel Selector
2005-01-27 11:56:37.682 MoreBezels[4684] G4 TV Quit TVR app Accepts First Responder
2005-01-27 11:56:37.683 MoreBezels[4684] G4 TV Quit TVR app Accepts First Responder
2005-01-27 11:56:37.683 MoreBezels[4684] G4 TV Quit TVR app Become First Responder
2005-01-27 11:56:37.704 MoreBezels[4684] G4 TV Quit TVR app
2005-01-27 11:56:37.710 MoreBezels[4684] G4 TV Record Now - choosing channel Accepts First Responder
2005-01-27 11:56:37.711 MoreBezels[4684] G4 TV Record Now - choosing channel Accepts First Responder
2005-01-27 11:56:37.711 MoreBezels[4684] G4 TV Record Now - choosing channel Become First Responder
2005-01-27 11:56:37.728 MoreBezels[4684] G4 TV Record Now - choosing channel
2005-01-27 11:56:37.734 MoreBezels[4684] iconGenerator Accepts First Responder
2005-01-27 11:56:37.734 MoreBezels[4684] iconGenerator Accepts First Responder
2005-01-27 11:56:37.734 MoreBezels[4684] iconGenerator Become First Responder
2005-01-27 11:56:37.752 MoreBezels[4684] iconGenerator
2005-01-27 11:56:37.757 MoreBezels[4684] iconSwitching Accepts First Responder
2005-01-27 11:56:37.757 MoreBezels[4684] iconSwitching Accepts First Responder
2005-01-27 11:56:37.757 MoreBezels[4684] iconSwitching Become First Responder
2005-01-27 11:56:37.770 MoreBezels[4684] iconSwitching
2005-01-27 11:56:37.786 MoreBezels[4684] MoreBezels Accepts First Responder
2005-01-27 11:56:37.786 MoreBezels[4684] MoreBezels Accepts First Responder
2005-01-27 11:56:37.786 MoreBezels[4684] MoreBezels Become First Responder
2005-01-27 11:56:37.816 MoreBezels[4684] MoreBezels
2005-01-27 11:56:37.821 MoreBezels[4684] Put local Formac in DV Out mode Accepts First Responder
2005-01-27 11:56:37.822 MoreBezels[4684] Put local Formac in DV Out mode Accepts First Responder
2005-01-27 11:56:37.822 MoreBezels[4684] Put local Formac in DV Out mode Become First Responder
2005-01-27 11:56:37.842 MoreBezels[4684] Put local Formac in DV Out mode
2005-01-27 11:56:43.216 MoreBezels[4684] G4 TV Record Now - choosing channel Accepts First Responder
2005-01-27 11:56:45.104 MoreBezels[4684] G4 TV Record Now - choosing channel Accepts First Responder
Executable “MoreBezels” has exited with status 0.