Hillegass Cocoa Programming bindings problem

DSG

Registered
In working through the RaiseMan application which is a document based application in (Cocoa Programming for Mac OSX Hillegass pg 134), I added an additional textField to hold the average expectedRaise.
personName and expectedRaise are columns in a tableView.

I can get the value displayed using the bindings info panel for the textField and bind it to NSArrayController . arrangedObjects . @avg.expectedRaise. No problem.
If I want to get that value into another method the book says you can get it by;
NSNumber * the Average
the Average =[employees valueForKeyPath:mad:"@avg.expectedRaise"];
An NSMutableArray *employees was created in the myDocument class for the undo manager in the next chapter which hold the array of Person objects. Also the NSArrayContoller has the employee array as it's content.

The question is: If I want to get the avg.expectedRaise value so it can be used in the Person or another class what code is required to get the employee array into another class. Also how do you convert the NSNumber in the above method back to a float value.
 
Back
Top