O'Reilly logo

Cocoa Programming for OS X: The Big Nerd Ranch Guide by Aaron Hillegass, Adam Preble, Nate Chandler

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Debugging Bindings

Bindings are a powerful feature of Cocoa, but they are notoriously difficult to debug. To a new Cocoa developer (and indeed even to the experienced), they can be quite mysterious. Because they are generally configured in the XIB file it can be difficult to track down the source of a problematic binding. Additionally, because they use strings, the compiler cannot help you by checking that the key actually exists on the object you are attempting to bind to.

The most common problem in using bindings is a key name typo, followed closely by binding to the wrong object. You will see this error at runtime when the related NIB file is opened: an exception will be logged to the console. There will be a couple dozen lines ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required