David, I asked our HUD expert and here's what he said:
In Motion HUDs cannot take key focus. So no HUD control can receive keyboard events. This is by design, it was felt that stealing the key focus would be distracting. (For instance the combo boxes in the text HUD do not take key events.)
I just tried the text tool HUD, and indeed, it doesn't appear to accept key events. If I start typing, it either puts the text onto the canvas, or if the text editing tool isn't selected, it does whatever those keystrokes would normally do (such as selecting other tools). So it's not just your combo box, it's any textual input that doesn't work in the HUD, even for built-in controls. If necessary, you can leave the control out of the HUD by adding the appropriate flag (kFxParameterFlag_DONT_DISPLAY_IN_DASHBOARD) when creating the custom control.
Darrin
On Jul 13, 2009, at 2:39 PM, David Yamnitsky wrote: Thanks Darrin! I had no idea I had to setup tracking rects, apparently this is new in leopard, sorry for the the trivial question. However, I do have another issue. I have a custom view which uses an NSComboBox. In Motion's HUD I can't enter text in the combo box, I can only select items from the pull-down list. This seems to be an issue along the same lines. I noticed that Motion's font chooser for the text tool uses combo boxes, and those work as expected in the HUD. Is there something I need to change in the responder chain? Thanks, David On Jul 13, 2009, at 5:00 PM, Darrin Cardani wrote:
On Jul 13, 2009, at 1:45 PM, David Yamnitsky wrote:
Hi all, I'm having some trouble that I'm sure others have encountered as well. I've found that cocoa views used for custom FxPlug parameters do not receive all NSResponder events, such as mouseEntered: and mouseExited: however mouseDown: and mouseUp: do work. Is there some way that I can get mouseEntered: and mouseExited: to work?
Have you set up tracking rects? You won't received -mouseEntered: calls unless you have, as far as I know. If you're just trying to change the cursor when in an appropriate area, you can use cursor rects:
[-someNSView addCursorRect:someRect cursor:someCursor]
If you need to do more complex stuff than just changing cursors, look up the docs for NSTrackingArea in the Cocoa Event Handling Guide:
<http://developer.apple.com/documentation/Cocoa/Conceptual/EventOverview/TrackingAreaObjects/TrackingAreaObjects.html#//apple_ref/doc/uid/10000060i-CH8-SW1>
Darrin
--
Darrin Cardani
email@hidden
|