• 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: Recognizing a 'folder' as a document type?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Recognizing a 'folder' as a document type?


  • Subject: Re: Recognizing a 'folder' as a document type?
  • From: Charles Jolley <email@hidden>
  • Date: Sat, 15 Jun 2002 10:44:49 -0500

Are you talking about creating a package (like RTFD)? If so, then there are two things you can do:

1) In your application target under the tab "Application Settings" you can set the document types associated with your application. Do the same thing here as you would for a regular file except check the "Package" check box.

This will create the typical "loose binding" recommended by Apple. If your file extension is one likely to be used only by your application, then this is probably all you will need.

For one of my projects, I support RTFD files. Normally, files with this extension are opened by TextEdit, but I want RTFD files I create to reopen with my application. With a regular file you would do this by setting the file's type and creator codes. Folders don't have these, but you can do the equivalent by creating a file in your package at the path "Contents/PkgInfo". For example, an RTFD file looks like this:

My Document.rtfd/
Contents/
PkgInfo
TXT.rtf (the text file for an rtfd file)

The PkgInfo file should have eight characters. The first four are the type code and the last four are the creator code. For example, for an application with the creator code 'myap' using rtfd, it would be:

RTFDmyap

This will create a "tight binding." That means that even if the user changes the default binding for files with your extension to some other application, the files containing this file will remain bound to your application. I do not recommend this unless you are working with a package type that other applications besides your may also want to claim.

I think you can find more information about all of this in the Mac OS X System Overview document.

-C

On Friday, June 14, 2002, at 06:07 PM, email@hidden wrote:

In my document application I want Finder to recognize that a FOLDER of a certain extension
is associated w/ my application / Icon..

It works great for files, but the folder is just a folder..

Any ideas??

thanks!

-sjm
_______________________________________________
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.
_______________________________________________
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.

References: 
 >Recognizing a 'folder' as a document type? (From: email@hidden)

  • Prev by Date: Wildcard Pasteboard type?
  • Next by Date: C question.
  • Previous by thread: Recognizing a 'folder' as a document type?
  • Next by thread: Thoughts on CodeWarrior 8 for Cocoa programming?
  • Index(es):
    • Date
    • Thread