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: Interapplication Communication /


Chapter 2 - Edition Manager

This chapter describes how you can use the Edition Manager to allow your users to share and automatically update data from numerous documents and applications.

The Edition Manager is available only in System 7 or later. It can be used by many different applications located on a single disk or throughout a network of Macintosh computers. To test for the existence of the Edition Manager, use the Gestalt function, described in Inside Macintosh: Operating System Utilities.

Read the information in this chapter if you want your application's documents to share and automatically update data, or if you want to share and automatically update data with documents created by other applications that support the Edition Manager.

For example, a user might want to capture sales figures and totals from within a spreadsheet and then include this information in a word-processing document that summarizes sales for a given month. The Edition Manager establishes a connection between these two documents. When a user modifies the spreadsheet, the information in the word-processing document can be automatically updated to contain the latest changes. To accomplish this, both the spreadsheet application and the word-processing application must support the features of the Edition Manager.

To use this chapter, you should be familiar with sending and receiving high-level events, described in the chapter "Event Manager" in Inside Macintosh: Macintosh Toolbox Essentials. Your application must also support Apple events to receive Apple events from the Edition Manager. See the following chapters in this book for detailed information on Apple events.

The Edition Manager provides you with the ability to

Building the capabilities of the Edition Manager into your program is similar to building cut-and-paste features into your program. Text, graphics, spreadsheet cells, database reports--any data that you can select, you can make accessible to other applications that support the Edition Manager. The next section provides an overview of the main elements of the Edition Manager. Following sections discuss how to implement these features in your application.

This chapter also describes an advanced feature that allows applications to share data directly from a file.


Chapter Contents
Introduction to Publishers, Subscribers, and Editions
About the Edition Manager
Using the Edition Manager
Receiving Apple Events From the Edition Manager
Creating the Section Record and Alias Record
Saving a Document Containing Sections
Opening and Closing a Document Containing Sections
Reading and Writing a Section
Formats in an Edition
Opening an Edition
Format Marks
Reading and Writing Edition Data
Closing an Edition
Creating a Publisher
Creating the Edition Container
Opening an Edition Container to Write Data
Creating a Subscriber
Opening an Edition Container to Read Data
Choosing Which Edition Format to Read
Using Publisher and Subscriber Options
Publishing a New Edition While Saving or Manually
Subscribing to an Edition Automatically or Manually
Canceling Sections Within Documents
Locating a Publisher Through a Subscriber
Renaming a Document Containing Sections
Displaying Publisher and Subscriber Borders
Text Borders
Spreadsheet Borders
Object-Oriented Graphics Borders
Bitmapped Graphics Borders
Duplicating Publishers and Subscribers
Modifying a Subscriber
Relocating an Edition
Customizing Dialog Boxes
Subscribing to Non-Edition Files
Getting the Current Edition Opener
Setting an Edition Opener
Calling an Edition Opener
Opening and Closing Editions
Listing Files That Can Be Subscribed To
Reading From and Writing to Files
Calling a Format I/O Function
Edition Manager Reference
Data Structures
The Edition Container Record
The Section Record
Edition Manager Routines
Initializing the Edition Manager
Creating and Registering a Section
Creating and Deleting an Edition Container
Setting and Getting a Format Mark
Reading in Edition Data
Writing out Edition Data
Closing an Edition After Reading or Writing
Displaying Dialog Boxes
Locating a Publisher and Edition From a Subscriber
Edition Container Formats
Reading and Writing Non-Edition Files
Application-Defined Routines
Summary of the Edition Manager
Pascal Summary
Constants
Data Types
Edition Manager Routines
Initializing the Edition Manager
Creating and Registering a Section
Creating and Deleting an Edition Container
Setting and Getting a Format Mark
Reading in Edition Data
Writing out Edition Data
Closing an Edition After Reading or Writing
Displaying Dialog Boxes
Locating a Publisher and Edition From a Subscriber
Edition Container Formats
Reading and Writing Non-Edition files
Application-Defined Routines
C Summary
Constants
Data Types
Edition Manager Routines
Initializing the Edition Manager
Creating and Registering a Section
Creating and Deleting an Edition Container
Setting and Getting a Format Mark
Reading in Edition Data
Writing out Edition Data
Closing an Edition After Reading or Writing
Displaying Dialog Boxes
Locating a Publisher and Edition From a Subscriber
Edition Container Formats
Reading and Writing Non-Edition files
Application-Defined Routines
Result Codes

Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996