Previous Book Contents Book Index Next

Inside Macintosh: Programmer's Guide to MacApp / Part 2 - Working With MacApp

Chapter 25 -
Working With Lists and Iteration

This chapter describes how to work with MacApp's list and iteration facilities. It also includes recipes and sample code that demonstrate how to

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.

Chapter Contents
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
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

Previous Book Contents Book Index Next

© Apple Computer, Inc.
25 JUL 1996