18. Responder Chain
Cocoa’s Responder Chain is a central and essential element of every graphical Cocoa application. It routes user events to the correct objects and simplifies the implementation of context-sensitive application features. The Responder Chain is also known as the Chain of Responsibility pattern.
This chapter describes the behavioral and logic problems that the Responder Chain solves. Application features as diverse as user input, automated menu item validation, undo and redo, copy and paste, font selection, error presentation, and all forms of context-sensitive input are simplified by the Responder Chain. It is closely related to the Hierarchies pattern explained in Chapter 16, “Hierarchies.” Hierarchies are primarily structural ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access