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: Cyberdog Programmer's Kit / Part 2 - Programming in Cyberdog
Chapter 4 - Creating a Cyberdog Display Part


Modifying Your Name-Mapping Resource

The name-mapping ('nmap') resource specifies the kinds of data that your part editor supports. Cyberdog prefers to use ISO strings based on MIME types for its part kinds. You must include the kCyberPartKind in your part editor's name-mapping resource in addition to any kinds of data your part editor supports.

Listing 4-25 shows the name-mapping resource for the text-viewer part. The text-viewer part supports text-application and plain-text data in addition to the Cyberdog part kind.

Listing 4-25 The kODNameMappings resource

resource kODNameMappings (kEditorKindMapId) {
   kODEditorKinds,
   {  /* array Types: 2 elements */
      /* [1] */
      kCybTxtViewerID,
      kODIsAnISOStringList
      {
         {  /* array ClassIDs: 3 elements */
            /* [3] */
            kTextPlainKind,
            kApplicationTextKind,
            kCyberPartKind
         }
      }
   }
};


Previous Book Contents Book Index Next

© Apple Computer, Inc.
13 JUL 1996