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 / Locating a Publisher and Edition From a Subscriber


GoToPublisherSection

When the user wants to locate the publisher for a particular subscriber (by clicking Open Publisher in the subscriber options dialog box), the SectionOptionsDialog function returns the action code 'goto' in the action field of the section options reply record. When you receive this action code, you should open the document containing the publisher.

First, use the GetEditionInfo function to find the edition container. Then use the GoToPublisherSection function to open the document containing the publisher.

FUNCTION GoToPublisherSection 
                        (container: EditionContainerSpec): OSErr;
container
An edition container record, which specifies volume reference number, directory ID, and filename of the subscriber's edition. You obtain the edition container by calling the GetEditionInfo function.
DESCRIPTION
The GoToPublisherSection function resolves the alias in the edition to find the document containing its publisher. In general, this function internally uses the GetStandardFormats function to get the alias to the publisher document and then resolves the alias. It next sends the Finder an Apple event to open the document (which launches its application if necessary) and, after the publisher is registered, sends a Section Scroll event to the publisher.

As an optimization, if there is a registered publisher, the GoToPublisherSection function simply sends a Section Scroll event to the publisher.

If the edition does not contain an alias and there are no registered publishers, then the GoToPublisherSection function sends an Open Documents event to open the edition to the creating application.

If the edition container is not an edition file (as is the case when you are using bottlenecks to subscribe to non-edition files), the GoToPublisherSection function sends the Finder an Apple event to open that file.

RESULT CODES
noErr0No error
fnfErr-43File not found
editionMgrInitErr-450Manager not initialized
badSubPartErr-454Invalid edition container
SEE ALSO
For illustrations of the section options dialog box for subscribers, see Figure 2-15 on page 2-44 and Figure 2-16 on page 2-45. For an example of responding to the action code 'goto', see Listing 2-8 beginning on page 2-46. For a description of the edition container record, see page 2-71.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996