Re: How to get my own icon when saving files?
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.