Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4124840
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T23:47:30+00:00 2026-05-20T23:47:30+00:00

Objective-c is learn-able; Cocoa is learn-able; I find Interface Builder and its descendant Xcode

  • 0

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???

enter image description here

  1. The Object called TableArray does not exist either in the Object library or in the source code; where does that come from?

  2. The Referencing Bindings on the right; how are these created?

  3. The various Key / Value pairs mentioned in the top of the awakeFromNib method; 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:

  1. TableArray is the Array Controller Object dragged 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)

  2. Stephen Poletto’s answer was an invaluable guide to connecting it all.

  3. It was not immediately apparent to me how the connection interface works in the right-click HUD:
    figure 2

  4. The storage array myContentArray is implicit in the instantiation of Array Controller Object

  5. Click and drag from the HUD of the TableArray to the AppDelegate’s definition in the .h file to create the connection there.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T23:47:31+00:00Added an answer on May 20, 2026 at 11:47 pm

    To establish the bindings described in the awakeFromNib comments:

    1. TableArray is an NSArrayController. At the far left of the Interface Builder document, you’ll see an outline view showing all of the objects contained in your nib. When this nib is loaded at runtime, all of the objects will be unarchived and instantiated. In the screenshot you provided, you’ll see the NSArrayController named “TableArray” is already there. If you needed to create another one for some reason, you’d drag an NSArrayController from the object library (lower right) into your Interface Builder document.
    2. Select the “Last Name” table column in Interface Builder. You can do this by pressing the disclosure triangles in the outline view until you see “Table Column – Last Name” or by selecting it directly in the main canvas area of IB. The inspectors (on the right side of the Xcode window) will now reflect details about the last name column, since it’s the currently selected object. Select the bindings inspector. You can hover over the icons at the top of the inspector until you find the one labeled “Show the Bindings Inspector” — it’s the second one from the right. The bindings inspector presents you with a list of all the exposed bindings for the selected NSTableColumn. You’ll see “Value” is one such binding – and that’s the binding we want to establish according to MyWindowController.m. Twiddle the disclosure triangle next to “Value” to reveal all the binding details.
    3. You can now specify the controller through which you’d like to establish the binding and controller/model key paths to use. Go ahead and check the “Bind” checkbox and select “TableArray” from the “Bind to:” popup button. Then, specify “arrangedObjects” as the controller key and “firstname” as the model key path.
    4. You’ll notice entering “firstname” caused Xcode to put up a gray warning icon with the tooltip “Xcode cannot resolve the entered keypath.” Xcode will try to resolve the keypath you’ve entered. So if you were binding through an NSArrayController that contained objects of the class Person, and the class Person defined a property called “address”, “arrangedObjects.address” would resolve appropriately and Xcode would validate your keypath as correct. But in this example, the array controller is managing NSDictionary objects, and there’s no way for Xcode to know what key/value pairs you’re storing in those dictionaries. You, the developer, should know that the dictionaries being stored in the NSArrayController do indeed contain a “firstname”/value pair, so you can ignore the warning.
    5. Repeat for the other bindings listed at the top of MyWindowController.m.

    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.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to learn Objective-C for xcode. I was wondering if there was an
I am using Xcode 4.3.2 and trying to follow along with the Learn Objective-C
I'm just starting to teach myself objective-c and attempting to learn the cocoa touch
I'm going to learn Objective-C, and I was wondering if there was an eclipse
I'm trying to learn objective C and one of the things i find very
I'm coming from C# development and just started to learn Objective-C and Xcode 4.
I'm trying to learn objective-c by making a GUI application using Xcode 3. I'm
Hey I'm trying to learn Objective-C and Cocoa Dev, but I'm having problems with
I'm just giving it a shot to learn objective C and Cocoa and play
A... as I learn Objective C. There will be close to 20 button on

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.