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

Type/Creator codes for RTFD Documents


  • Subject: Type/Creator codes for RTFD Documents
  • From: Tod Cunningham <email@hidden>
  • Date: Mon, 9 Feb 2004 21:23:00 -0500

I am writing an application that has a custom icon and type creator code for the documents it creates. It can create RTF and RTFD documents. I followed the steps as outlined in:

http://developer.apple.com/documentation/Cocoa/Conceptual/Documents/ Tasks/SavingHFSTypeCodes.html


This works great for RTF documents, but the RTFD documents don't get tagged with the type/creator information even though the fileAttributesToWriteToFile method is getting called. The RTFD document ends up with it's system default icon and TextEdit is assigned to launch it as opposed to the application that created it (YUCK).

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?
2. How do I give the RTFD a custom icon and associated it with the
application that created it?

Thanks,

Tod Cunningham
_______________________________________________
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.

  • Follow-Ups:
    • Re: Type/Creator codes for RTFD Documents
      • From: "M. Uli Kusterer" <email@hidden>
  • Prev by Date: Re: MVC question
  • Next by Date: Re: Drawing onto NSImageView subclass (Newbie)
  • Previous by thread: Carbon App -> Cocoa Bundle -> Cocoa Bundle...
  • Next by thread: Re: Type/Creator codes for RTFD Documents
  • Index(es):
    • Date
    • Thread