|
Version: 1.0 Posted: 2007-02-23 Build Requirements: Xcode MacOSX10.4u.sdk Runtime Requirements: Mac OS X 10.4 Tiger Download Sample (TwoManyControllers.zip, 202.9K) |
||||
DescriptionThis sample demonstrates how NSArrayControllers can be used to produce a user interface that traverses multiple (in this case two) to-many relationships. The basic model consists of a Product with a to-many relationship to a Version which in turn has a to-many relationship to a License. That is, a product has many versions, and a version has many licenses. In this example, we would like the user to be able to select a single Product and display all the Licenses associated with that Product. To accomplish this we use an intermediate NSArrayController that holds an array of all the Versions associated with the selected Product. We then populate the Licenses NSArrayController with the distinct set of objects returned from asking every Version object in the Versions Array Controller (the arrangedObjects) for its Licenses key path. Document Revision History
|
|