Important: The information in this document is obsolete and should not be used for new development.
|
|
Log In | Not a Member? |
Contact ADC |
Chapter 25 -
This chapter describes how to work with MacApp's list and iteration facilities. It also includes recipes and sample code that demonstrate how to
Working With Lists and Iteration
The topic of lists and iteration is introduced in "Lists and Iteration," beginning on page 61, and includes a description of MacApp's primary list classes.
- define and work with a sorted list class
- iterate over the items in a list
Chapter Contents
- Overview
- Working With Lists of Objects
- Creating a List
- Adding an Object to a List
- Deleting an Object From a List
- Finding an Object in a List
- Freeing a List
- Iteration
- Recipes--Lists and Iteration
- Recipe--Defining and Working With a Sorted List Class
- Define a Class Based on One of MacApp's Sorted List Classes
- Define a Compare Method to Order the Items in Your List
- Create a List Object in Your Application
- Add Items to the List
- Recipe--Iterating Over the Items in a List
- Choose an Iterator for the List
- Initialize the Iterator
- Use the Iterator in a For Loop to Access the Items in the List
- Optionally Add Accessor Methods
Get information on Apple products.
Visit the Apple Store online or at retail locations. 1-800-MY-APPLE Copyright © 2007 Apple Inc. All rights reserved. | Terms of use | Privacy Notice |