I am reading the book and at chapter 8, the RaiseMan application. If i just follow the book, i have no problem at all building the RaiseMan app, but i am not satisfied! I cannot keep my brain from asking why why why and why, how how how and how :mrgreen:
Then came to the end of the chapter where i finished challenge 1 and 2. Well, i am satisfied because i understand why and how things work by making all the connections manually (without binding).
I didn’t want to give up so i read the binding document from Apple, after a long time reading, i confused myself even more. And i am stuck right here with the controller objects, NSObjectController, NSArrayController…Here is what i think about them, please correct me:
-For the NSArrayController, it “holds” an array and have some functions to work with the array. In the Figure 8.4, it says “[color=#800000]contentArray=employees[/color]”. That made me thought the NSArrayController has an instance variable called contentArray, is it true? Well well, i guess not but i am not sure . Here is what i read on Apple online document “[color=#0000FF]NSObjectController exposes a single binding for content called contentObject[/color]”. That made me thought, no, the contentArray is not an instance variable of the class NSArrayController, but then what does it mean by “a binding”? Or is it just the way they call it in the Interface Builder? (Content Array)
-Then from the NSArrayController, we get the content array back by calling -arrangedObjects: , is it correct? But one thing i am sure, the -arrangedObject: return an array. In the Figure 8.9, the Value is bound to the array controller, and the controller key is arrangedObjects, model key path is personName. I wonder if there is any other way to bind the value of a column of a table view directly to an array without having to use NSArrayController.
-The NSArrayController also manages what are selected in a table view, is it correct?
And many more questions but i cannot formulate them right now …
Thank in advanced,