views:

220

answers:

1

Let me summarize that shortly: A "First Responder" in a NibFile is an Object, which represents the UI control element that has the user's focus. So if the user klicks on an UI control, the Nib sets that clicked UI control as First Responder. In my app I could make an outlet to that "First Responder" from the Nib, so that I could for example send a message "make red font color" to whatever the user has activated by clicking.

And then, if this First Responder UI control does not understand that message, the message gets passed up in the responder chain, until a parent element or grandparent (and so on) UI control element understands the message. Otherwise it will be ignored.

So First Responder always establishes a "link" to the UI control that has focus. Is that right?

(Exact duplicate of http://stackoverflow.com/questions/598455/objective-c-cocoa-first-responder-did-i-get-that-right by the same author)

A: 

The first responder is simply the object that will be told (and given a chance to respond) to an event (such as a mouse click) in your application.

Paul Robinson