• 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: Icons
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Icons


  • Subject: Re: Icons
  • From: "Louis C. Sacha" <email@hidden>
  • Date: Sat, 15 Nov 2003 15:09:06 -0800

Hello...

You should be able to add a CFBundleDocumentTypes entry to the apps info.plist, set up like this:

<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>EXTENSION</string>
</array>
<key>CFBundleTypeIconFile</key> <string>ICON</string>
<key>CFBundleTypeName</key> <string>TYPE DESCRIPTION</string>
<key>CFBundleTypeOSTypes</key>
<array>
<string>TYPE</string>
</array>
<key>CFBundleTypeRole</key> <string>None</string>
</dict>

... dictionaries for any additional file types ...

</array>

"CFBundleTypeExtensions" should be your unique extension (without the .)
"C FBundleTypeIconFile" should be the name of your icon file (without the .icns)
"CFBundleTypeName" should a readable description of the file type (it is displayed in open dialogs)
"CFBundleTypeOSTypes" is an array of MacOS filetype codes
"CFBundleTypeRole" defines how you app interacts with files of that type, "None" only provides an icon, if you want the files to open your app when double clicked, you will need to use "Editor" or "Viewer".

I don't know what XCode has for editting this stuff, since I'm still using Project Builder and editing the plist entries directly in the Expert editor in the Active Target settings. There may be a pane in the Simple editor to do this also, and this info should hopefully give you enough to start from.

Louis



As for the files, if your application is document based then just do the same for the Document Icon under the targets view. I don't know how to do it if the app isn't document based. I asked on the list once but received no reply...
_______________________________________________
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: Search Hard Drive
  • Next by Date: Re: NSTextField getting input number by number
  • Previous by thread: Re: Icons
  • Next by thread: from where do you install jaguar dev tools???
  • Index(es):
    • Date
    • Thread