17. Outlets, Targets, and Actions
When you build a graphical user interface, you need a way to configure user interface objects, such as buttons, sliders, text fields, and menu items, and connect them to application-specific operations. For example, an application might provide a menu item to center selected text and another menu item to send a seating request to an airline reservation system. Finding a good way to connect user interface objects to application-specific operations is a common recurring problem.
One potential solution is to create application-specific subclasses of the user interface objects like menu items. For example, you could create a CenterTextMenuItem class and a SendSeatingRequestMenuItem class. However, there are a number ...
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