Skip to main content

Cocoa Bindings

  • Chapter
Learn Cocoa on the Mac
  • 375 Accesses

Abstract

In Chapters 4 and 5, you learned about how to connect a controller object to various kinds of view objects, both to display values and to retrieve new values in response to user actions. In our examples, we typically had one small action method for each view (triggered when the user edited the value displayed in the view), plus one large updateDetailViews method that updated the contents of all the views at once (called whenever the selection changed). That’s fine for a simple project, but there are some problems with that approach. First of all, there’s a scalability issue. Imagine having not ten, but a hundred views. Following our approach, you’d end up with a controller having a hundred small action methods, and one huge method to push values into all of the views!

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 29.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 39.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Rights and permissions

Reprints and permissions

Copyright information

© 2010 Jack Nutting, David Mark and Jeff LaMarche

About this chapter

Cite this chapter

(2010). Cocoa Bindings. In: Learn Cocoa on the Mac. Apress. https://doi.org/10.1007/978-1-4302-1860-9_6

Download citation

Publish with us

Policies and ethics