Some extracts from Apple Developer’s Manuals which are important for me. That helps me to understand how I could respond to definite event in my application.
A responder is an object that can receive events, either directly or through the responder chain, by virtue of its inheritance from the
NSApplication, NSWindow, NSDrawer, NSWindowController, NSView and the many descendants of these classes in the Application Kit inherit from
If we take a look at the following list we’ll see that not only
NSResponder descendants could actually respond to that messages.
- The main window’s first responder and the successive responder objects up the view hierarchy
- The main window itself
- The main window’s delegate (which need not inherit from
- The application object,
- The application object’s delegate (which need not inherit from
Connecting custom controller instance of a class, derived from
NSObject (or other class not rooted to
NSResponder) class to
delegate outlet also puts controller object into FirstResponder chain.
Keep in mind sequence of responders in the chain when deciding which class should contain responding method.