Cocoa-binding : Master-Detail sample code

A few years ago, topics like Cocoa-Binding, Key-Value coding, Key-Value observing, Core Data were hot issues. Nowadays people have more interest in Core Animation, iPhone, OpenGL ES, and so on.

However, topics like Cocoa-binding, Key-Value coding/observation are always important and it is good to refresh knowledge on those.

So, recently while I was writing short sample program, I got to think about it again, and reminded me of Apple’s poor documentation on Cocoa Binding.

Cocoa Binding looks very simple. But the way it is explained is confusing. It is difficult to figure out what is wrong once your NIB/XIB file doesn’t work as expected for Cocoa Binding. So, you want to have some sample code for experiment.

Actually Apple provided one good sample…. but in text not actual code.
So, it takes time to figure out what says. It is the Master-Detail thing.

So, I would like share its full source code.
Additionally, I added an “addNew” action handler in MyDocument.m for testing. If I have a chance I would like to talk about it.

Here is the sample project!


Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: