• 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 for RTFD Documents
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

re: Type/Creator codes for RTFD Documents


  • Subject: re: Type/Creator codes for RTFD Documents
  • From: Timothy Carl Buchheim <email@hidden>
  • Date: Mon, 9 Feb 2004 19:41:36 -0800

I traced this down to the fact that RTFD is really a directory created with a file wrapper (RTFDFileWrapperFromRange) that really produces a directory of files. Seeing how the RTFD is really a directory it isn't allowing the type/creator attribute information. I have two questions:


1. Why is fileAttributesToWriteToFile still getting called?

there are other attributes (such as timestamps) which do apply to directories


2. How do I give the RTFD a custom icon and associated it with the
application that created it?

You should be able to make a foo.rtfd/Contents/Info.plist file with appropriate values for the CFBundlePackageType and CFBundleSignature keys (and, optionally, put the codes in foo.rtfd/Contents/PkgInfo)


See the following documentation:
http://developer.apple.com/documentation/MacOSX/Conceptual/ BPRuntimeConfig/Tasks/ConfigApplications.html
http://developer.apple.com/documentation/CoreFoundation/Conceptual/ CFBundles/Concepts/anatomy.html

As far as I can tell, setting the filetype/creator this way works for document bundles as well as application bundles.



For example, I created an RTFD file (foobar.rtfd) with TextEdit and then created a foobar.rtfd/Contents directory, and then wrote "RTFDxcde" to the file foobar.rtfd/Contents/PkgInfo

The finder now opens my file in Xcode when I double click it.



--
Tim Buchheim System Administrator
Computer Science Department Phone: (909) 607-3485
Harvey Mudd College Fax: (909) 607-8364
1250 N Dartmouth Ave E-mail: email@hidden
Claremont, CA 91711 http://www.cs.hmc.edu/~tcb/
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Re: variadic variable argument list in #define
  • Next by Date: Re: Identifying preferencePanes
  • Previous by thread: Re: Type/Creator codes for RTFD Documents
  • Next by thread: Re: Type/Creator codes for RTFD Documents
  • Index(es):
    • Date
    • Thread