Key Value Coding 4: Using A Dictionary Instead Of ivars

Download and open up KVO4. Here is KVO4 running:
KVO4-1
This Key Value Coding example replaces the individual ivars of KVO3 with a dictionary and adds a third car. It also replaces the Car class with a Vehicle class. AppController now contains an ivar called cars that is an NSMutableDictionary containing Vehicles:
KVO4-2
The Vehicle class has no accessors.

AppController reads the values out by using valueForKey twice: once to access the dictionary to find the Vehicle, and then again to access the ivar inside the Vehicle object:
KVO4-3
And since the Vehicle class handles the unknown key case by returning an "Unknown: " string:
KVO4-4
we get the same kind of result as we did for the Car class.
The Bagelturf site welcomes Donations of any size