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 / Edition Manager Reference
Edition Manager Routines / Creating and Deleting an Edition Container


DeleteEditionContainerFile

If a user cancels a publisher section within a document or closes a document containing a newly created publisher without saving, you need to remove the edition container.

To locate the appropriate edition container to be deleted, use the GetEditionInfo function. You use the UnRegisterSection function (only after using the GetEditionInfo function) to unregister the section record and alias record of the publisher being canceled.

To remove the edition container, use the DeleteEditionContainerFile function.

FUNCTION DeleteEditionContainerFile (editionFile: FSSpec): OSErr;
editionFile
The volume reference number, directory ID, and filename for the edition container being deleted.
DESCRIPTION
If the user cancels a publisher, do not call the DeleteEditionContainerFile function until the user saves the document. This allows the user to undo changes and revert to the last saved version of the document.

The DeleteEditionContainerFile function deletes the edition container only if there is no registered publisher. You need to unregister a publisher before you can delete its corresponding edition container.

You should use the DeleteEditionContainerFile function even if there are subscribers to the edition. When a subscriber section tries to read in data, it receives an error if the edition container has been deleted.

RESULT CODES
noErr0No error
nsvErr-35No such volume
ioErr-36I/O error
bdNamErr-37Bad filename
fnfErr-43 File not found
dirNFErr-120Directory not found
editionMgrInitErr-450Manager not initialized
SEE ALSO
See page 2-98 for detailed information on the GetEditionInfo function. See page 2-77 for information on the UnRegisterSection function. For information on file specification records, see Inside Macintosh: Files.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996