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 -- [EMAIL PROTECTED]
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>