• 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: First Responder and taborder?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: First Responder and taborder?


  • Subject: Re: First Responder and taborder?
  • From: Ken Thomases <email@hidden>
  • Date: Mon, 16 Jun 2008 20:51:12 -0500

On Jun 16, 2008, at 7:52 PM, William Squires wrote:

Dumb question expecting a dumb answer here...
1) I know the First Responder sets which control in a window gets the focus, but what about if you app has multiple windows, each of which has several controls which could get the focus (when the window is frontmost)? How is this handled if there's only one First Responder?

See the Cocoa Event-Handling Guide, in particular the Event Architecture chapter and its section about Responders and the Responder Chain:


http://developer.apple.com/documentation/Cocoa/Conceptual/EventOverview/
http://developer.apple.com/documentation/Cocoa/Conceptual/ EventOverview/EventArchitecture/chapter_2_section_5.html
http://developer.apple.com/documentation/Cocoa/Conceptual/ EventOverview/EventArchitecture/chapter_2_section_6.html


While each window may have its own first responder, there is only ever one first responder for any given message.


2) How does one set the tab order for fields in a data-entry form type of window? (where you have several NSTextFields, NSButtons, etc...)

Each view has a "nextKeyView" outlet. You can connect (in IB or in code) that outlet from one view to another view. That determines where focus goes when you hit Tab.


http://developer.apple.com/documentation/DeveloperTools/Conceptual/ IB_UserGuide/AdvancedTechniques/chapter_9_section_2.html


Cheers, Ken _______________________________________________

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: 
 >First Responder and taborder? (From: William Squires <email@hidden>)

  • Prev by Date: Re: (no subject)
  • Next by Date: Re: nib and xib
  • Previous by thread: First Responder and taborder?
  • Next by thread: nib and xib
  • Index(es):
    • Date
    • Thread