• 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: How to get my own icon when saving files?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to get my own icon when saving files?


  • Subject: Re: How to get my own icon when saving files?
  • From: Christopher Holland <email@hidden>
  • Date: Tue, 22 Apr 2003 07:55:39 -0500

On Tuesday, April 22, 2003, at 07:28 AM, Peter Karlsson wrote:

I honestly don't know what you mean now. As far as I know there is some coding that must be done to get this to work? Do you really mean that the only thing I must do is to type a icon name in PB? It does not work.

No problem. Let's see if I can make it more clear.

* Let's say that your saved files will have an extension of '.smpl' and you already have an icon for this file type (smpIcon.icns).
* Drag the icns file into your project. I usually just put it in with the other Resources since that is where it will end up in the built package anyway.
* Now you will have to edit your Target in PB. Under the "Info.plist Entries" -> "Simple View" item...
* Look for the "Document Types" section and notice that it should have a single entry. Change the "Extensions" and "OS Types" fields to the extension that you want to use for your documents (i.e. smpl or whatever you are using). Also, this is where you tell it what icon to use for the files.

* Save, clean, build.

For the document icons to work correctly I think you may have to move your application from the build directory to the Applications directory and then logout/login.

BTW, most of this is pulled straight from Hillegass's Cocoa book. I highly recommend it for any Cocoa programmer.

Christopher Holland
_______________________________________________
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: 
 >Re: How to get my own icon when saving files? (From: "Peter Karlsson" <email@hidden>)

  • Prev by Date: Re: How to get my own icon when saving files?
  • Next by Date: Re: Simple Image Editing App Architecture Question
  • Previous by thread: Re: How to get my own icon when saving files?
  • Next by thread: Re: How to get my own icon when saving files?
  • Index(es):
    • Date
    • Thread