Adding a Talent Display Group
The browser you just created is going to display a list of Talent objects. Like a repetition element, a browser has list and item attributes. As the browser moves through its list, the browser sets item to the object at the current index. The Movies application uses a display group to provide the browser with a list of Talent objects, so now you need to create the new display group and a variable to bind to the browser's item attribute.-
Use the Add Key command to create two new instance variables:
-
talentDisplayGroup, whose type is WODisplayGroup
-
talent, whose type is Talent
You don't need to add set and get methods for the variables.
-
Using the Display Group Options panel, assign the talentDisplayGroup object's entity to Talent.
Remember that to open the Display Group Options panel, simply
double-click the talentDisplayGroup variable in the object browser. The icon initially displayed next to the variable indicates that initialization parameters have not yet been set. -
Configure talentDisplayGroup to sort its objects alphabetically (ascending) by lastName.
-
Configure it to fetch on load and click OK.
After you configure talentDisplayGroup, the object browser shows a icon next to the variable.
© 1999 Apple Computer, Inc. (Last Updated 24 Aug 99)