• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Type/Creator codes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Type/Creator codes


  • Subject: Re: Type/Creator codes
  • From: Ali Ozer <email@hidden>
  • Date: Sat, 12 May 2001 17:56:48 -0700

> I can't seem to find any cocoa API for setting Type/Creator codes on
> files you create. Does anyone know of any?
> ...
> Since the source for TextEdit comes with the developer CD, I thought I
> might "fix" it so that it saves files with type/creator codes TEXT/text
> which TextEdit seems to work with. Maybe make the .rtf/.txt optional
> in preferences. Not sure what to do with .rtfd since really the finder
> should hide that like it does for .app.

There is indeed a need to save type/creator codes in some cases, even
from Cocoa apps. For instance, if you want to generate documents which
work properly on Mac OS 9.

However, for many new apps, and for documents that don't need to be
opened on 9, you should not have to set types or creator codes; file
extensions by themselves should be enough.

Of course one downside of file extensions is the fact that they are in
the user's face, and they are fragile. However, 10.0 is not the final
word on how extensions will work on Mac OS X. We are looking at ways to
enhance things such that the user experience of file extensions is at
least as good as the user experience of Mac OS file types on Mac OS 9,
while retaining the advantages of file extensions --- the fact that they
are web-friendly and cross-platform. More on this later. (By that I
don't mean later today!)

In the meantime, it might be reasonable to add Mac OS type codes to
documents, as this will make them less fragile with regards to changing
names. However, Mac OS creator codes (as opposed to type codes) are
discouraged, as they create a "strong binding" between the document and
an application, ignoring the user's settings for default apps. This is
usually bad for common document types (such as images, html, etc). For
other document types, claimed by just one app, the creator is usually
not needed anyway. Sophisticated apps might want to give the user the
choice of writing out the creator code (the choice would be for
"establish strong binding to app").

Ali


  • Follow-Ups:
    • Re: Type/Creator codes
      • From: John Hörnkvist <email@hidden>
    • Re: Type/Creator codes
      • From: "Kevin C." <email@hidden>
    • Re: Type/Creator codes
      • From: Uli Zappe <email@hidden>
    • Re: Type/Creator codes
      • From: Fritz Anderson <email@hidden>
References: 
 >Type/Creator codes (From: Jamie Curmi <email@hidden>)

  • Prev by Date: Re: Q: Designated initializers: what are they?
  • Next by Date: Re: Q: Designated initializers: what are they?
  • Previous by thread: Re: Type/Creator codes
  • Next by thread: Re: Type/Creator codes
  • Index(es):
    • Date
    • Thread