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


CreateEditionContainerFile

You use the CreateEditionContainerFile function to create an empty edition container.

FUNCTION CreateEditionContainerFile 
                     (editionFile: FSSpec; fdCreator: OSType; 
                      editionFileNameScript: ScriptCode): OSErr;
editionFile
The volume reference number, directory ID, and filename for the edition container being created.
fdCreator
The creator type for the edition.
editionFileNameScript
The script of the filename. (You can get this value from the theFileScript field of an edition container specification record.)
DESCRIPTION
The CreateEditionContainerFile function creates an empty edition container file (it does not contain any formats). This function sets the file type of the edition to 'edtu'. As soon as you write data to the edition, the Edition Manager updates the type (to 'edtp' for graphics, 'edtt' for text, or 'edts' for sound). If your application writes both 'TEXT' and 'PICT' formats to the edition, the Edition Manager sets the file type to the type that was written first. If your application has a bundle, you should designate an icon for the appropriate edition types that you can write.

RESULT CODES
noErr0No error
dskFulErr-34Disk is full
nsvErr-35No such volume
ioErr-36I/O error
bdNamErr-37Bad filename
fnfErr-43File not found
dirNFErr-120Directory not found
editionMgrInitErr-450Manager not initialized
SEE ALSO
For information on file specification records, see Inside Macintosh: Files. For an example of the use of CreateEditionContainerFile, see Listing 2-4 on page 2-33.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996