realbasic-nug
[Top] [All Lists]

Re: FileType OS X RB2006r2

To: REALbasic NUG <realbasic-nug at lists dot realsoftware dot com>
Subject: Re: FileType OS X RB2006r2
From: "Joseph J. Strout" <joe at strout dot net>
Date: Tue, 25 Apr 2006 13:46:53 -0600
Delivered-to: realbasic-nug at lists dot realsoftware dot com
References: <3CFF6704-76DF-4C95-8B4F-170B162E78BB at xhtmlsoft dot com> <76456BA0-FCB4-4343-AE77-3A54E1EE005C at mac dot com> <00D463D7-9A9C-4996-A63A-5F304A0E7FE9 at mac dot com>
At 8:30 PM +0200 4/25/06, Hans-Georg wrote:

As you've discovered, MacType is the wrong thing to use to separate these files, as .txt, .html and .xml are all plain text file types, which is why you can edit any of them in any text editor...

I can't follow your argument. In my and Sven's experience it is exactly the opposite: You have to use the MacType, but with a dummy value (which is not TEXT and hopefully hasn't been used by someone else)

You have to do that in order to attempt to cheat the system and make it work in a way it's not designed to work.

A file that can open text files is supposed to be able to open any TEXT file, regardless of its extension. If you open it and find that it's not the sort of text you support, then you can notify the user.

A somewhat better experience can be had by peeking inside the files and filtering based on what you find, but this is not easy to do in RB.

However, making up a dummy type and using that is NOT the answer, as it will render your app incapable of opening up files which have the right extension but also have a proper Mac type. (Your app could open an app with a type of XXXX, *or* with no type and one of your defined extensions, but not an app with the right extension and a type of TEXT.)

Best,
- Joe

--

Joe Strout  --  joe at strout dot net
Available for custom REALbasic programming and training.
_______________________________________________
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>


<Prev in Thread] Current Thread [Next in Thread>