Re: Passing focus to a control

2008-09-29 Thread Mike Abdullah
Directly quoting the -becomeFirstResponder: docs: Use the NSWindow makeFirstResponder: method, not this method, to make an object the first responder. Never invoke this method directly. Also, it's called a method, not a function. On 29 Sep 2008, at 09:36, Cocoader wrote: I have a window of

Re: Passing focus to a control

2008-09-29 Thread Nick Zitzmann
On Sep 29, 2008, at 2:36 AM, Cocoader wrote: When I press Cmd-J I get my function called but can't work out how to get the control to get the focus. I've tried becomeFirstResponder but nothing happens and no error occurs. Please help! I'm sure this is an obvious error, but after 3 hours I

Passing focus to a control

2008-09-29 Thread Cocoader
I have a window of controls, a NSComboBox and some NSTextFields. I want to be able to place the cursor in the NSComboBox when the user selects Cmd-J. All of the code for managing the window is in an .h and .m file: @interface HF_Browser : NSDocument { ... When I press Cmd-J I get my functio