19. Bindings: Wiring an OS X Application

If you have another look at Figure 18.1, you’ll see that even in the abbreviated form Mac Passer Rating will take, there will be more than 20 pieces of information distributed across 4 displays, to be filled in, edited (in some cases), and coordinated across updates. This is going to involve some tedious, repetitive code and a lot of communications infrastructure through the network of objects, isn’t it?

No. AppKit (the Mac-specific part of Cocoa) offers a facility called bindings, supplemented by NSController classes, which are subtle when you first encounter them, but once you master them, they can cut your coding burden by an order of magnitude.

Note

Experienced Mac programmers—and Apple itself—will ...

Get Xcode 5 Start to Finish: iOS and OS X Development 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.