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
GetEditionInfofunction. You use theUnRegisterSectionfunction (only after using theGetEditionInfofunction) to unregister the section record and alias record of the publisher being canceled.To remove the edition container, use the
DeleteEditionContainerFilefunction.
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 theDeleteEditionContainerFilefunction until the user saves the document. This allows the user to undo changes and revert to the last saved version of the document.The
DeleteEditionContainerFilefunction 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
DeleteEditionContainerFilefunction 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 theGetEditionInfofunction. See page 2-77 for information on theUnRegisterSectionfunction. For information on file specification records, see Inside Macintosh: Files.