• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Setting text field as first responder in an NSView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Setting text field as first responder in an NSView


  • Subject: Re: Setting text field as first responder in an NSView
  • From: Eric Williams <email@hidden>
  • Date: Thu, 02 Jun 2011 13:57:02 -0400

Jens,

This worked, once I fixed my typos. Thanks!

----
Eric Williams
AIM: email@hidden
Skype: wilersh





On Jun 1, 2011, at 1:49 PM, Jens Alfke wrote:

>
> On Jun 1, 2011, at 9:15 AM, Eric Williams wrote:
>
>> I want to set the first responder for the window to be a text field in the NSView after the view is loaded, so that a user can immediately start typing into the field.
>
> After the view is loaded into the window, call
> 	[window makeFirstResponder: textField];
>
> You may also need to call [window recalculateKeyViewLoop] to tell the window to update the tab order of focusable controls in the window (unless you set the checkbox in IB on the window to have it do this automatically.)
>
> —Jens

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Setting text field as first responder in an NSView (From: Eric Williams <email@hidden>)
 >Re: Setting text field as first responder in an NSView (From: Jens Alfke <email@hidden>)

  • Prev by Date: RE: What is the point of a host-reachability test that doesn't test the reachability of the host?
  • Next by Date: Re: Code style (was: Notify With Parameters)
  • Previous by thread: Re: Setting text field as first responder in an NSView
  • Next by thread: Re: Setting text field as first responder in an NSView
  • Index(es):
    • Date
    • Thread