SFTypeList typelist;
typelist[0]='PICT';
StandardGetFile (nil, 1, typelist, &reply);
The problem is that for some odd reason, 'TEXT' files are also showing up.
This makes absolutely no sense to me. If I change the typelist[0] to be
equal to something totally bogus like 'snal' (maybe reserved somewhere,
but the point is obvious) no files show up except for folders which would
be the expected behaviour. Why is this not working for PICT files? Any
help is much appreciated. In case it matters, I am using CW10 and MacOS
7.5.5.
--
Eric Bourque
Centre for Intelligent Machines
McGill University
er...@cim.mcgill.ca
> I have what I believe is a stupid question, so I am hoping there will be a
> quick simple answer. I am trying to get an FSSpec for a PICT file that a
> user chooses, so I use StandardGetFile with the appropriate arguments:
>
> SFTypeList typelist;
>
> typelist[0]='PICT';
>
> StandardGetFile (nil, 1, typelist, &reply);
>
> The problem is that for some odd reason, 'TEXT' files are also showing up.
> This makes absolutely no sense to me. If I change the typelist[0] to be
> equal to something totally bogus like 'snal' (maybe reserved somewhere,
> but the point is obvious) no files show up except for folders which would
> be the expected behaviour. Why is this not working for PICT files? Any
> help is much appreciated. In case it matters, I am using CW10 and MacOS
> 7.5.5.
>
Maybe you should say:
typeList = { 'PICT', 0L, 0L, 0L };
I'm thinking maybe your compiler is initializing one of those array cells
to a value that the system reinterprets into 'TEXT', so if you zero them
out, you're okay. Just a wild guess.
--
The Universe is a Figment of its Own Imagination
I'm guessing that you're being messed with by Macintosh Easy Open and QuickTime.
Of course, I could be wrong -- this is only a guess.
Greg Lo