Understanding File & Icon Associtions in Tiger (long)

markwm

Registered
I seem to have spent the last two days trying to get my head around how Tiger deals with File & Icon associations. I started using OSX with Panther and Tiger seems alot more Windows like with the way it handles associations. I was always led to believe that in OS X, a file opens with the application which created it. After doing lots and lots of tests, this seems not be the case at all.

I'm running Tiger 10.4.5 on a G4 Powerbook. Here's what I've found, I've tested this stuff on my user account and a brand new one and both give me the same results. I'm posting this mainly to try and confirm if my experiences are shared with other Tiger users....whether this is any use to you or not is another matter, you probably know it already but I felt I needed to write this down just to make sure I understand it myself.

1. I have two text editors on my machine 'TextEdit' & 'TextMate' both allow me to save .txt files(plain text documents). By default Tiger seems to want to open *all* .txt files in TextEdit, and all such files have the TextEdit .txt icon.

If I create a brand new plain text file in TextMate and save it as 'textmate.txt' the file will still open with TextEdit by default and will still have the TextEdit style Icon.

Using Xray to get detailed info on the file, I can see no creator data is present and it's bound to <no application>. More on this later....

If I 'get info' on 'textmate.txt' and go down to the 'open with' panel and then set TextMate to open the file, the icon will change instantly to a TextMate icon and sure enough it will now open with TextMate rather than TextEdit. Using Xray again to view detailed info, this time the file is now bound to the application 'TextMate.app'.

Now, all the other .txt files on my system, whether created with TextEdit or TextMate all still open with TextEdit and have the TextEdit icon EXCEPT ofcourse for the 'texmate.txt' file. This makes perfect sense, as I have just customized 'textmate.txt'. If I now 'get info' on one of my other .txt files, say one that's called 'textedit.txt', proceeding to the 'open with' tab and choosing Open with 'Safari' and then clicking 'Change All'. Now, all my .txt files open with Safari except for 'textmate.txt' because it is bound to TextMate and it has a TextMate icon still. All my other .txt files get the Safari icon, but only after a Finder relaunch (why is this?)....'textedit.txt's' icon changed striaght away but other .txt files remain with their old icon until Finder is relaunched. An important note here also is that all these other .txt files aren't bound to anything, according to XRay. <no application>

To finish off, if I go back to 'textmate.txt' and 'get info', and change the 'opens with' to Safari, this file with now be bound to Safari. Even though now ALL my .txt files have the same icon and all open with Safari 'textmate.txt' is still unique because it is the only one that is bound to an applicaition(Safari). You can tell it's different because 'change all' *is not* dimmed/greyed out unlike all the other .txt files. In order to unbind it from Safari, clicking the 'change all' in it's 'get info' window binds it to <no application>, and thus dims the option. This means that it will follow the rest of the .txt files from now on, almost like it's been unlocked.

So, it seems the creator of a file has little impact on what application opens a file in Tiger, it's the binding that counts. I've done a similar test with Fireworks MX 2004 which does add creator info to the files it saves and exports. But these files will still open with Preview if I have previously 'changed all' .png files to open with Preview.

It also appears that the 'open with - change all' affects future saves. Was it like this in Panther? Like I said, I always assumed before moving to OS X that files always opened with the applications that created them. This doesn't seem true at all under Tiger. Instead you can quite easily use Word to create .doc files and have Pages open them when you double click them.

All of the above makes sense to me, and I kinda like it. The only thing I don't like is the fact that I always have to relaunch finder after doing a 'change all' in order to see ALL my changed icons.

2. I've noticed problems may occur if applications that save the same kind of file, specify a different file kind, ie..

Kind: GIF (gif)
Kind: Graphics Interchange Format (gif)

Kind: Plain Text Document (txt)
Kind: Standard Document (txt)

This causes problems I noticed with icon associations.

3. Applications such as Photoshop and Fireworks, when saving seem to create an embedded preview icon. Saving a native fireworks PNG file creates an icon that is a preview of the file, it's not possible to copy, delete or paste over this icon in the 'get info' window. Saving a PSD from photoshop also results in an icon with a similar preview BUT this time you are able to copy/paste over/delete the icon in the 'get info' window.

These icons also remain in column view, so it's not the same as the 'show preview icon' pref in Finder which isn't actually available in column view.

4. Mac OS X seems to be unable to specify system wide icons. For example, Pages is able to save and edit RTF files so you can quite easily have all your rtf files open in pages by default. BUT, Pages does not have an icon associated with rtf files so if you do have have your rich text files all open with Pages you'll have to put up with a blank/generic icon file.

You can ofcourse manually change the icons so that they aren't blank but this is hardly a solution as you will have to do it everytime you create a new rtf file.

I can't see any way to specify an default icon for rtf files, ala Windows. ? It seems such a simple thing to ask to do.

5. Custom Icons seem to work in the same way that files can be bound to a certain application. When you give a file a custom icon, no matter what changes you make to associations or 'change all' or whatever else the custom icon remains on that file until you delete it from the 'get info' window. Once deleted, the files icon reverts to what it would be if no custom icon was pasted in.

6. Even when saving a .PSD file from Photoshop CS, the resulting file is not bound to photoshop, the creator is set as Photoshop CS but the binding is <no application>. Meaning you can quite easily change all of your PSD files to open with Fireworks or another app that can edit PSD files. So if Photoshop isn't even binding PSD files to only open with it, then I don't see what else is. This destroys the idea that files saved with application X, open with application X. It depends totally on the default setting for that file type/kind.

---------

I understand this a whole lot better now than I did 48 hours ago, but it can be kinda hard to understand the rules which OS X adheres to. I just hope all the above is mirrored on your 10.4.5....?
 
'... Tiger seems alot more Windows like with the way it handles associations.' - most of us noticed the progression since the pre-release copy of MacOS X 10.0.0.

'Mac OS X seems to be unable to specify system wide icons.' - is incorrect. Default (non assigned custom) application, (non assigned custom) document, and folder icons will display default 'system wide' icons, as one example.

'Saving a native fireworks PNG file creates an icon that is a preview of the file, it's not possible to copy, delete or paste over this icon in the 'get info' window.' - you cannot remove the icon, resulting in the 'system default' document icon; however, yes, you can paste other icons on to it. Only after pasting an icon over the original icon, can one then delete that (new) icon, resulting in ... the 'system default' (dog eared) document icon.

'Even when saving a .PSD file from Photoshop CS, the resulting file is not bound to photoshop, the creator is set as Photoshop CS but the binding is <no application>.' - while that may be true at your location, with your Mac, it is not true elsewhere. Any 'Photoshop CS2' file that I have created, launches 'Photoshop CS2' when double clicked on.

I am referencing the above to MacOS X 10.2.8, 10.3.4, 10.3.8, 10.3.9, 10.4.0, 10.4.3, and 10.4.4. I doubt, although it is possible, that MacOS X 10.4.5 will change the above experiences. Besides, I am waiting for MacOS X 10.4.6 - and its fixes ... of all fixes ...
 
You have quite a long post based on your misunderstanding of the MacOS X system for associating files with their default applications. The default application is the application that launches when you double-click on a file. The default application does not preclude your opening a file in any other application. All you have to do is to open the file from within the File/Open dialog box. Alternatively, you may drag & drop file on the icon of the app that you want to open it.

MacOS X's preferred method for determining the default app by the file extension. However, the user may set the default application in the Get Info... dialog box for a single file or for all files with a particular extension. MacOS X also supports CREATOR and TYPE codes from MacOS 9 and earlier. Just as in the case of file extensions, the MacOS X method is more flexible than the MacOS 9 method. Using the Get Info... dialog box, the user may override the original application associated with the CREATOR/TYPE codes in favor of his preferred application. This may be done for a single file or for all files with a particular CREATOR/TYPE code set.

Admittedly, the MacOS X method may generate an occasional glitch. However, it is totally within the control of the user to fix the glitch. The added flexibility more than makes up for any inconvenience.
 
barhar said:
most of us noticed the progression since the pre-release copy of MacOS X 10.0.0.

No need to get smart eh.. ;-)

barhar said:
'Mac OS X seems to be unable to specify system wide icons.' - is incorrect. Default (non assigned custom) application, (non assigned custom) document, and folder icons will display default 'system wide' icons, as one example.

You know what I meant tho, blank icons are hardly useful to many people.

barhar said:
however, yes, you can paste other icons on to it. Only after pasting an icon over the original icon, can one then delete that (new) icon, resulting in ... the 'system default' (dog eared) document icon.

hmm, you're right there. What threw me I guess was the fact that when you click the fireworks preview icon in the 'get info' window, it doesn't have the blue glow that happens when you select other icon types.

barhar said:
Any 'Photoshop CS2' file that I have created, launches 'Photoshop CS2' when double clicked on.

You misread what I wrote. That's exactly what happens on my mac aswell. But those files are still not 'bound' to photoshop. If you use Xray to see more detailed info, you'll see a PSD created by photoshop isn't bound to it. It opens with Photoshop because that's the default app for PSD files.

After you've done that, try this. 'Get info' on your PSD, go to the open with tab and select it to open with Illustrator. Don't close the info window, and then move it back to open with 'Photoshop'. Now the file will be bound to Photoshop, as confirmed with Xray.

See attachments below to see what I mean.
 

Attachments

  • notbound.gif
    notbound.gif
    55.7 KB · Views: 6
  • bound.gif
    bound.gif
    52.9 KB · Views: 3
MisterMe said:
You have quite a long post based on your misunderstanding of the MacOS X system for associating files with their default applications.

Indeed, however. The majority of what I wrote appears to hold true. So it's not fair to call it a complete misunderstand, although before I looked further into this I didn't have much idea. But, that is because I'm constantly hearing "a file opens with whatever app created it" which just ain't so.

MisterMe said:
The default application is the application that launches when you double-click on a file.

right, the default for that file, not necessarily the file type/extension overall. Although it would be unless you customize/changed a file to open with something else other than the default app.

MisterMe said:
The default application does not preclude your opening a file in any other application. All you have to do is to open the file from within the File/Open dialog box. Alternatively, you may drag & drop file on the icon of the app that you want to open it.

I kinda knew that much I think ;-)


MisterMe said:
However, the user may set the default application in the Get Info... dialog box for a single file or for all files with a particular extension.

That's not true. Like I found out in my OP, if something has been customized to open with [whatever] it cannot be affected by the 'change all' applied to *another* file of the same type/extension. So if you have

1.txt, 2.txt, 3.txt

You customize 1.txt to open with Dreamweaver. You 'get info' on 2.txt and set it to open with TextEdit and then click 'change all'. Afterwards, 1.txt will still open with Dreamweaver, so the term "change all" is often misleading.

MisterMe said:
However, it is totally within the control of the user to fix the glitch. The added flexibility more than makes up for any inconvenience.

I agree, I think it's actually pretty solid and flexible for the most part.
 
''... Tiger seems alot more Windows like with the way it handles associations.' - most of us noticed the progression since the pre-release copy of MacOS X 10.0.0.' ... 'No need to get smart eh..' - was not directed specifically towards you; but, as an observation since the release of MacOS X.

'You know what I meant tho, blank icons are hardly useful to many people.' - regardless of 'hardly useful' they are the default system icons. If you want custom icons for default applications, documents, and folders - there are many to be downloaded or created.
 
barhar said:
If you want custom icons for default applications, documents, and folders - there are many to be downloaded or created.

Could you explain this further? If the above is true, I'd like to know how this is possible

I want all my .doc files to open with TextEdit. Therefore, TextEdit is the default application for .doc files. TextEdit has no associated icon for .doc files therefore in this instance they'll all be blank.

I'd like to have a custom icon used throughout my system for .doc files. meaning, all future .doc files I create get this custom icon. ie, it will be the default icon for .doc files. I don't wanna be going through ALL my .doc files individually and manually pasting in the icon either.

How exactly is this possible to do in OS X *without* the use of 3rd party icon apps and *without* delving deep into a preference file to edit some code? I don't think it is.
 
Back
Top