I recently followed a Beginning Cocoa BNR coarse, which was great. So now I am going through the book again and try to go a littler further in each chapter.
Using the chapter 8 code as an example, I wrote a small program (not document based) that has an nstableview and an array controller, which in turn is populated by a mutable array “radiologists” with pointers to “Radiologist” objects. I created this array and filled it in the app delegate, in the applicationDidFinishLaunching: method. As far as I can tell, all bindings and other settings are in place.
The array gets properly filled as confirmed with NSLog. But the nstableview stays empty, even though I bound it to the array radiologists. The columns are defined to look at the ivars of the “Radiologist” objects.
When I add a button to my window and connect its action to add: in the nstableview, the entire array appears when I press the button!
Am I forgetting something? I would say that the moment of filling the array is not so important as long as its contents are bound to the tableview.
(EDIT Intro on Feb 20th)