Responders
When keyboard events, mouse events, timer events, or other events are detected by the run loop and the NSApplication instance that manages the run loop, those events are converted into instances of the NSEvent class and dispatched to other objects using Objective-C messages. The use of messaging is an important difference from other user interface toolkits and results in much of the power and flexibility of Cocoa. The Application Kit does not use C-language switch statements or explicit tables of function pointers. The messaging capabilities built into the Objective-C runtime are ideally suited to event dispatching.
An object that can receive event messages is called a responder. Figure 8.1 illustrates the relationships and communications ...
Get Cocoa® Programming now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.