Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[Q] StandardGetFile for PICT files

3 views
Skip to first unread message

Eric Bourque

unread,
Nov 18, 1996, 3:00:00 AM11/18/96
to

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.

--
Eric Bourque

Centre for Intelligent Machines
McGill University
er...@cim.mcgill.ca

Hugh Johnson

unread,
Nov 18, 1996, 3:00:00 AM11/18/96
to

In article <ericb-18119...@news.mcgill.ca>, er...@cim.mcgill.ca
(Eric Bourque) wrote:

> 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


Gregory Lo

unread,
Nov 20, 1996, 3:00:00 AM11/20/96
to

In article <ericb-18119...@news.mcgill.ca>, er...@cim.mcgill.ca
(Eric Bourque) wrote:
>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.

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

0 new messages