Re: Associate icon with file ext. / quick look
Re: Associate icon with file ext. / quick look
- Subject: Re: Associate icon with file ext. / quick look
- From: Seth Willits <email@hidden>
- Date: Thu, 18 Oct 2012 11:29:07 -0700
On Oct 18, 2012, at 4:04 AM, Jean Suisse wrote:
> Thank you for your reply. I am not familiar with the topic, but if I understand you correctly, what you say implies that :
>
> 1. The icon for the file type must be the same than the icon for the app.
> 2. If my app generates three files of different types for each record (e.g.: a setup file containing parameters, a raw acquired data file, a signature file), I can't have three different icons, one for each file
No, not at all.
A dozen different applications may be able to open and edit a certain file type, but only *one* application on the system is designated as the default handler for that file type. (It "owns" the file type in my prior lingo.) This is the application that will launch and open the file if you double-click it in Finder.
*That* application is the one responsible for supplying the icon for the file type, not the application which created the file. In other words Acrobat and Preview can both open and save pdf files, but Preview is the default handler for pdf files on my system, so the system will show pdf files using Previews's pdf file icon, even if I create a pdf file inside of Acrobat. If I set Acrobat as the default handler, all pdf files would display using Acrobat's pdf icon.
However, there are exceptions to this.
1) You (or an application) can set a file to open with an application other than the default handler for its file type, so it would not use the default handling application's icon for that file type.
2) You (or an application) can set a custom file icon on a file, even if it isn't the default handling application. So while Preview may be the default handler for pdfs on my system, Acrobat could set a custom icon on the file. When I double-click on it, it may still open in Preview, though unless Acrobat did #1 and overrides the default to claim ownership for that *specific* file.
So what I am saying is if your "Creator" application is creating ".jean" files, but the "Viewer" application is the one set to be the default handler for .jean files when they're double-clicked in Finder, then Finder will display .jean files using the icon for the .jean file type that Viewer has in its bundle. Creator's icon for .jean files will not be used.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden