Important: The information in this document is obsolete and should not be used for new development.
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 theUnRegisterSection
function (only after using theGetEditionInfo
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 theDeleteEditionContainerFile
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
noErr 0 No error nsvErr -35 No such volume ioErr -36 I/O error bdNamErr -37 Bad filename fnfErr -43 File not found dirNFErr -120 Directory not found editionMgrInitErr -450 Manager not initialized SEE ALSO
See page 2-98 for detailed information on theGetEditionInfo
function. See page 2-77 for information on theUnRegisterSection
function. For information on file specification records, see Inside Macintosh: Files.