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 / Reading and Writing Non-Edition Files


CallEditionOpenerProc

Use the CallEditionOpenerProc function to call an edition opener.

FUNCTION CallEditionOpenerProc 
                     (selector: EditionOpenerVerb; 
                      VAR PB: EditionOpenerParamBlock;
                      routine: EditionOpenerProcPtr): OSErr;
selector
An edition opener verb. When the CallEditionOpenerProc function is called by the Edition Manager, the selector parameter is set to one of the edition opener verbs (eoOpen, eoClose, eoOpenNew, eoCloseNew, eoCanSubscribe).
PB
An edition opener parameter block.
routine
A pointer to an edition opener function.
DESCRIPTION
The Edition Manager calls an edition opener function whenever it needs to open or close an edition. The Edition Manager passes an edition opener parameter block as one of the parameters to an edition opener function. The edition opener parameter block is defined by this structure:

TYPE EditionOpenerParamBlock = 
   RECORD
      info:          EditionInfoRecord;   {edition container to }
                                          { be subscribed to}
      sectionH:      SectionHandle;       {publisher or }
                                          { subscriber }
                                          { requesting open}
      document:      FSSpecPtr;           {document passed}
      fdCreator:     OSType;              {Finder creator type}
      ioRefNum:      LongInt;             {reference number}
      ioProc:        FormatIOProcPtr;     {routine to read }
                                          { formats}
      success:       Boolean;             {reading or writing }
                                          { was successful}
      formatsMask:   SignedByte;          {formats required to }
                                          { subscribe}
   END;
To override the standard reading and writing functions, you should create an I/O function that contains the following parameters.

FUNCTION MyIO (selector: FormatIOVerb; 
               VAR PB: FormatIOParamBlock): OSErr;
Set the selector parameter to one of the format I/O verbs (ioHasFormat, ioReadFormat, ioNewFormat, ioWriteFormat). The PB parameter contains a format I/O parameter block record.

SEE ALSO
See "Calling an Edition Opener" beginning on page 2-64 for additional information.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996