Hi Sven

Seems this thread had got a little out of hand!

It is quite surprising that Joe is of the opinion that Mac apps don't have pull downs in the Open menu. Although he no longer works for RS, it wasn't that long ago since he did, so if he thinks that way, it's a fairly sure bet RS thinks that way too. And we have shown that this is not a trick used by MS or Adobe, because Apple and third party shareware apps also use pull downs.

Anyway, the heart of the matter is your particular problem. Many people have commented on the correct way to select files using MacType, and they are largely correct. Most of the apps I and other mentioned that have pulldowns clearly use MacType as the fundamental separation issue eg Word versus Excel files, Tiff versus Jpeg, although some may use an extension filter too.

Your problem is that text, html and xml files are all text files, i.e. of MacType text. That is to say that are not magically different, but are just composed of ordinary text characters, such as angle brackets and characters. It is up to the opening software, such as a web browser, to parse for what are defined as "tags" and display the text correctly. The same applies to xml.

As such, as you have found, using MacType="text" will display all types of text files, but of course that will open any xml files that have no extension, or are "incorrectly" labelled as .txt, .xtml or .htm.

It would be my opinion that using multiple filtering options should generate an exclusive group for the Open Dialog, not an inclusive group, but this may be an OS problem rather than a Rb bug. If the latter, then of course it should be fixed. This seems to be part of your problem.

If however you are sure you only want to display files with an extension of .xml, and ignore any other valid xml files (eg .plist), then your solution works fine but it will not open all files that have xml tags in them.

To be able to open every file that contains xml then you will have to allow all text files, and have parsing code in your app that will then bring up a dialog after Open if the file contains no xml, since text files may or may not have any hidden file or header info.

As far as I can see there is no other way to do this.

To reiterate: there is no real difference between the .txt, .htm, .html, .xtml or .xml extensions - they are all text files. It is just *convention* that .xml files should contain xml, just as .htm and .html should contain html. As an example, html files should all have a tag with the version of html used as the first line, but if it's not there, the web page will still be readable, it's just convention that the line is there as an aid to browsers. Ultimately there is no way of knowing what is in a text file until you open it.

Another example would be .ico files for favicons, those little 16x16 icons that show up in the nav bars of browsers. There is no such thing as an .ico file (at least in this context), as they can be tiffs, jpegs or gifs. They do not have to have a special graphic format. The convention of calling them .ico is so that MS IE knows what to do with them. But on a Mac, with a MacType, it aids tremendously in opening these, because due to licensing problems, not all graphics apps can open gifs for example.


Tony Spencer
St Rémy de Provence (13) France

http://tonyspencer.blogspot.com/


_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to