Target-Action Paradigm

One of the most powerful features of the Application Kit is its use of the target-action paradigm. Objective-C messages that have one object argument are called actions. The one argument is usually the sender of the action message. A target is an object that can receive action messages. Targets and actions can be defined programmatically or in Interface Builder. The target-action paradigm is a key mechanism with which user interface elements respond to user actions. The target-action paradigm is implemented with four parts, the NSControl class, the NSActionCell class, the NSApplication class, and the responder chain. User interface elements such as menu items, buttons, and text fields are implemented as subclasses of either ...

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.