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 ...
Get Cocoa Design Patterns 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.