Objective-c is learn-able; Cocoa is learn-able; I find Interface Builder and its descendant Xcode 4 to be completely inscrutable! There is no text (as the equivalent of C or Obj-c source code) to refer to. All descriptions are all “drag here; connect that; Ctl drag there” and I remain lost….
I have been trying to go through the various Apple examples of key technologies. I have been going through Cocoa Bindings and the example file in the example NSTableViewBinding in Apple developer. To try and understand it, I have been trying to replicate it.
Referring now to the comments at the top of the awakeFromNib method in the file MyWindowController.m How do I make these connections in Xcode 4???

-
The
ObjectcalledTableArraydoes not exist either in the Object library or in the source code; where does that come from? -
The
Referencing Bindingson the right; how are these created? -
The various Key / Value pairs mentioned in the top of the
awakeFromNibmethod; how are these created?
I know that Xcode 4 is supposed to be a more straightforward improvement, but I am very confused by the replacement for IB. All the IB materials on the web refer to the completely different earlier versions, so I cannot find much in the way of help.
Follow-up
I did succeed in figuring out Cocoa Bindings in Xcode 4. I was able to duplicate the functionality of the example program in a few lines of code.
Here are the issues that took me a while to figure out:
-
TableArrayis theArray Controller Objectdragged over from the Object Library to the Objects list in the XIB and then renamed. (Note to Apple: a base object class would be nice in the right-click HUD view) -
Stephen Poletto’s answer was an invaluable guide to connecting it all.
-
It was not immediately apparent to me how the connection interface works in the right-click HUD:

-
The storage array
myContentArrayis implicit in the instantiation ofArray Controller Object -
Click and drag from the HUD of the TableArray to the AppDelegate’s definition in the .h file to create the connection there.
To establish the bindings described in the awakeFromNib comments:
The referencing bindings section of the connections inspector shows you all the bindings that have already been established through the selected controller. So if you select the TableArray and navigate to the connections inspector, you’ll now see “arrangedObjects.firstName” -> Value, Table Column – First Name. This is showing you the binding you just established above.
Before diving into a more advanced topic like Cocoa Bindings, it might be worthwhile to get comfortable working with Interface Builder. Use it to create IBOutlet and IBAction connections, both natively within IB and between IB and source code. Get used to using the inspectors to modify attributes of the UI objects, etc. Once you’re comfortable with the general workflow of IB, tackling bindings will be easier. Here’s a guide to help.