Search code examples
cocoabindingnsarraycontroller

Cocoa: non document based app, array controller bindings?


I've looked around and haven't found a clear answer. I'm trying to use an array controller in a non document based app and I can't seem to make it work. Is it impossible to do this?

I'm not sure how to get the content array to bind to the controller. Even a pointer to some reading material would help. Thanks. :)


Solution

  • Of course it's possible -- In IB in the bindings inspector, under the "Content Array" heading choose the class that contains the array you want to bind from the pull down menu, then click the "Bind to" box. In the "Model Key Path" field, type in the property name of your array. That's all there is to it.