Newbie Questions

I’m having some problems doing my first ApplescriptObjC project (a little app for CSRs to produce a job folder structure on one of our servers).

I’ve got a little three-item radio group and when I try to set up bindings in IB I can’t seem to select just the matrix (I have no problems binding the individual cells, but not the matrix itself). If I control-click from the property reference to the interface, it only lets me hit the cells. If I try going the other way, from the matrix to the script, I see only an Outlet (delegate) and three Received Actions (the two defaults and the one connected to my button). Is there something special I need to do for radio groups?

Also, all of my bindings to my various text fields and combo fields show up as “Outlets” when I control click on the blue cube, while the bindings in Shane Stanley’s book examples show up as “Referencing Bindings” leading me to think I’m completely doing this binding thing wrong.

I’m using Xcode 4.2 under Lion.

–jon

Hi Jon,

First, lets get the nomenclature correct. What you are doing is making connections not bindings. Bindings are a whole different topic, and you’ll save yourself some headaches later if you keep the two topics straight in your mind by using the correct names. As far as making a connection to your matrix (radio group), you do that by control dragging from the App Delegate blue cube to a spot between the cells, then choosing the outlet name you want to connect – it can be a little tricky to find that spot. The other way to do it, is to drag to the name of the UI element (matrix in this case) in the list that you get by expanding the views under the window entry in your object list. Just click on the disclosure triangles until you can see all your UI elements, and you can make all the connections to those if you prefer. As far as outlets vs “referencing outlets” (should be referencing outlets not bindings), it depends on which way you are looking. From the app delegate blue cube, all the connections to your UI elements should show up as outlets, but if you control click on your matrix, that connection will show up as a referencing outlet.

When you drag the other way, from the UI element to the app delegate blue cube, that is for making connections to actions (or delegate), not for making outlet connections – that’s why you only see those choices.

There is another way to make these connections, which is actually how I do it. When I was first starting out, I couldn’t remember which way to drag, so I do it by right clicking on the app delegate blue cube to open up that window that shows all the outlets and actions that are available. I then drag (not control drag) from the open circle next to the outlet name or action name to the UI element. This way, all the dragging is done in one direction, and you can immediately see that the connection has been made.

Ric

I know, they are a bit of a b**** to select in Xcode 4. But you can also do it from the Document outline. Click on your matrix and it should automatically select (if the document outline is expanded as a list view), then you can connect from your delegate to the matrix just fine. :slight_smile:

Model: MacBookPro8,2
Browser: Safari 534.51.22
Operating System: Mac OS X (10.7)

Found the sweet spot to hit the matrix. Many thanks. And I’ll spend a little more time looking over the differences between connections and bindings.

–jon