NSTextField, NSButton, and NSTextView
NSTextField, NSButton, and NSTextView
- Subject: NSTextField, NSButton, and NSTextView
- From: Changmook Chun <email@hidden>
- Date: Fri, 17 Aug 2001 06:22:08 +0900
Hi,
Developing a small application, I hit a problem that I can't solve.
There are an object of NSTextField, an object of NSButton, and an object
of NSTextView in a window.
Let's call them aTextField, aButton, and aTextView, respectively.
The aTextField is the initial first responder of the window, and the
aButton is the default button of the window.
I want to make the aTextView the first responder of the window when
Return key is pressed in the aTextField, i.e.,
1. Type some characters in the aTextField.
2. Hit Return.
3. Process internally the characters entered.
4. Move the cursor into the aTextView automatically.
I tried makeFirstResponder: and selectKeyViewFollowingView: methods in
NSWindow but only failed.
Could you possibly let me know a correct way to implement this, please?
Thank you.
Changmook.