The Full Wiki

More info on Creator code

Creator code: Wikis


Note: Many of our articles have direct quotes from sources you can cite, within the Wikipedia article! This article doesn't yet, but we're working on it! See more info or our list of citable articles.

Encyclopedia

From Wikipedia, the free encyclopedia

The creator code is responsible for linking the file and the program that will launch when the file is double-clicked. This Mac OS window show four files of the same type code (MP3), but with four different creator codes: Audn (Audion), hook (iTunes), SCPL (SoundApp) and NSWa (Winamp).

A creator code is a mechanism introduced in pre-Mac OS X versions of the Macintosh operating system to link a data file to the application program which created it, in a manner similar to file extensions in other operating systems. Codes are four-byte OSTypes. For example, the creator code of the HyperCard application and its associated "stacks" is WILD. This allows the application to launch and open a file whenever any of its associated files is double-clicked.

Creator codes could contain numbers and some special characters. Occasionally they represented inside jokes. For instance, the Marathon computer game had a creator code of 26.2 (the approximate length, in miles, of a marathon) and Marathon 2 had a creator code of 52.4.

The key difference between extensions and Apple's system is that file type and file ownership bindings are kept fully distinct. This allows files to be written of the same type - TEXT say - by different applications, and freely opened by any application that can read TEXT files, but when double-clicked, will open the original application that created it. With the extensions approach, this distinction is lost - all files with a .txt extension will be mapped to a single text editing application.

Mac OS X retains creator codes, but supports extensions as well. The type and creator system is considerably richer and more sophisticated than that provided by extensions, and many users felt that adopting DOS conventions is a backward step. They claim that type and creator information rightfully belongs to the metadata associated with a file, and is therefore illogically placed within the file's name, where its presence can cause problems for the user. Apple defends the decision by saying that extensions have become the de facto standard for indicating file type, and they need to work seamlessly with the rest of the industry.

Apple's developer documentation states that applications should continue to set type codes and optionally set creator codes. If either already exists, applications should preserve them.[1] Furthermore, creator codes are used in document binding prior to the file extension alone.[2]

Creator codes are not readily accessible for users to manipulate, although they can be viewed and changed with certain software, most notably the Mac OS X command line tools GetFileInfo and SetFile which are installed as part of the developer tools into /Developer/Tools.

In Mac OS X 10.6 Snow Leopard, the creator code is ignored by the operating system

References

  1. ^ http://developer.apple.com/documentation/MacOSX/Conceptual/BPFileSystem/Articles/FilenameExtensions.html#//apple_ref/doc/uid/20002297-110671
  2. ^ http://developer.apple.com/documentation/Carbon/Conceptual/LaunchServicesConcepts/LSCConcepts/chapter_2_section_8.html#//apple_ref/doc/uid/TP30000999-CH202-BABBJJEF

See also

External links








Got something to say? Make a comment.
Your name
Your email address
Message