Re: NSTextView and First Responder
Re: NSTextView and First Responder
- Subject: Re: NSTextView and First Responder
- From: Bill Cheeseman <email@hidden>
- Date: Wed, 24 Apr 2002 06:47:27 -0400
on 02-04-24 12:54 AM, John Tsombakos at email@hidden wrote:
>
I have a question with having the insertion point appear in a NSTextView
>
when an application starts up. The one I'm looking at is the new HTML
>
Editor sample at Stepwise <http://www.stepwise.com>. I followed the
>
directions and set up the simple app. But when it ran, there wasn't an
>
insertion cursor in the text field. I looked around, in list archives,
>
in the Hillegass Cocoa book and came up with dragging a connection from
>
the window to the NSTextView and connecting the InitialFirstResponder.
>
But it didn't work.
If I recall correctly, the Aqua Human Interface Guidelines state that an
application window should not show a live cursor in any text field or view
when the window first opens. Instead, the user should have to hit the tab
key or click to give keyboard focus to the first text field. I believe the
reason has to do with avoiding accidental data changes if the user hits the
keyboard while a window is opening. So the behavior you're seeing is
correct, even with a first responder designated in IB.
Also, if I recall correctly, the approved behavior can be the opposite in
dialogs. You see many dialogs throughout the system where a text field is
"live" when the dialog opens. For example, the standard Print dialog has a
live cursor in the number of copies text field, so you can just hit a number
key and press return to quickly get a print job started. Scott's advice
tells you how to do this.
--
Bill Cheeseman - email@hidden
Quechee Software, Quechee, Vermont, USA
http://www.quecheesoftware.com
The AppleScript Sourcebook -
http://www.AppleScriptSourcebook.com
Vermont Recipes -
http://www.stepwise.com/Articles/VermontRecipes
Croquet Club of Vermont -
http://members.valley.net/croquetvermont
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.