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 2 - Working With MacApp


Chapter 16 -
Working With Documents

This chapter includes recipes and sample code that demonstrate how to

MacApp's document classes are described in detail in Chapter 7, "Document Handling."

Recipes for turning documents into electronic mail can be found in Chapter 29, "Working With PowerTalk Mailers."

For an overview of how to read and write a document with a stream, see Chapter 27, "Working With Streams."


Chapter Contents
Overview
Creating and Initializing a Document
The DoInitialState Method
The DoMakeViews Method
The UntitledName and SetTitle Methods
The DoPostMakeViews Method
Saving a Document's Print Information
Recipes--Documents
Working With Documents--A General Outline
Recipe--Reverting to a Previous Version of a Document
Include the Revert Menu Item in Your File Menu
Override FreeData in Your Document Class
Override DoInitialState in Your Document Class
Override RevertDocument in Your Document Class
Override ShowReverted in Your Document or View Class
Recipe--Saving the Current Selection With a Designator
Override SetUserSelection in Your Document Class
Override RevealSelection in Your Document Class
Recipe--Saving and Restoring a Document's Display State
Define a Display State Information Record and a Document Field
Add a Boolean Field to Specify Reopening
Write the Display State Record When Writing
Read the Display State Record When Reading
Set the Document's Display State From the Record When Reopening

Previous Book Contents Book Index Next

© Apple Computer, Inc.
25 JUL 1996