Re: Setting Document Icon
Re: Setting Document Icon
- Subject: Re: Setting Document Icon
- From: "Louis C. Sacha" <email@hidden>
- Date: Thu, 14 Oct 2004 23:06:23 -0700
Hello...
As John Stiles mentioned, the Cocoa way of mapping an icon to files
with a particular type/creator will cause your application to be
launched whenever a matching file is double clicked, even when the
CFBundleTypeRole attribute for that document type is "None".
I'm not sure what the interface guidlines have to say about the
matter, but I think most users would expect the icon of the file to
represent the application that will open it. Personally, I would
probably just leave the default icon alone when writing out a format
that the app can't read.
If you still want to use some sort of custom icon, you might want to
search the archives for the thread "Finder Icon Badging..." from
2004/02/02. Rainer Brockerhoff posted code to show how to use the
Carbon API to badge the icon of a particular file (add an overlay to
the icon). An example of badging is the small curved arrow added to
the icon of an alias to a file.
This might be an acceptable solution, although you would end up
adding a resource fork to your files. If you use a small badge, the
default icon is still visible as an indication of the app that will
open the file, but your app still "gets credit" for writing the file.
Hope that helps,
Louis
I've been looking around for this but haven't had any luck... How
can I change the icon of files that my program creates? Or better
yet, change the icon for all files of that type.
My program tars up files, but it doesn't untar them- so I don't want
those documents to try to open with my program. Is this possible?
Thanks,
-dennis falling
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden