Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Programmer's Guide to MacApp / Part 1 - MacApp Theory and Architecture
Chapter 3 - Core Technologies


Lists and Iteration

A list is a data structure that stores a variable number of items of similar types. MacApp provides classes for creating and manipulating lists, making it possible for your application to use lists without having to implement the low-level details.

MacApp's list classes are implemented on top of a dynamic array model. Each item in a list has a unique index--you can access items in a list by index or by standard list-traversal methods.

The following list describes some of MacApp's list classes:

Iteration is a general-purpose mechanism for traversing the items in a list. MacApp provides the CIterator class and a large number of specialized subclasses that operate on lists containing items of various types. Iteration classes can traverse the items in a list without knowing the exact details of the data structures involved.

The use of iteration classes with MacApp's failure-handling mechanism can require extra caution. See "Failure Handling Embedded in Objects" on page 59 for more information. For additional information on using lists and iterators in your application, see Chapter 25, "Working With Lists and Iteration."


Previous Book Contents Book Index Next

© Apple Computer, Inc.
25 JUL 1996