> I have a problem which I don't understand:
>
> I am using codeWarrior 9.3.
>
> I am trying to select and open files of type PICT, regardless of the creator,
> so, according to the documentation I use
err=NavCreateCooseFileDialog(&NavOptions,fileTypeListH,NULL,NULL,NULL,NULL,&outDi
> alog);
>
[quoted text clipped - 6 lines]
> (*fileTypeListH)->componentSignature=kNavGenericSignature;
> (*fileTypeListH)->osType='PICT'
This should be (*fileTypeListH)->osType[0]='PICT';
> What happens is that only PICT files with the component signature equal to the
> creator tag of the application are selected.
I just tried this (with the above correction) in 10.3.7 and it worked
as advertised. The only other difference in my code is that I set the
"reserved" field to 0.
> Other PICT files are dimmed and
> cannot be selected, in particular PICT files of type 'ttxt' created by grabbing
[quoted text clipped - 19 lines]
> sizeof(fsref),
> &actualSize);
err=FSGetCatalogInfo(&fsref,kFSCatInfoGettableInfo,&cinfo,&uname,fspec,NULL);
err=FSGetCatalogInfo(&fsref,kFSCatInfoFinderInfo,&cinfo,&uname,fspec,NULL);
> err=FSpGetFInfo(fspec,&finfo);
Why do you use this? You can get the file's type from cinfo:
( (FileInfo*)cinfo.finderInfo )->fileType;
> I get a finfo.fdtype=0, not ='PICT' as it should be expected.
I seem to recall vaguely that FSpGetFInfo() might have bug in it. But
you don't need it anyway.
Larry
Conrado Pla - 28 Jan 2005 10:29 GMT
> > I have a problem which I don't understand:
> >
[quoted text clipped - 3 lines]
> creator,
> > so, according to the documentation I use
Thanks for your help Larry:
I tried with the modifications you suggest but the same thing happens: PICT
files produced by iMovie (creator "ttxt") are dimmed and unselectable. If I set
Navigator to show all files (passing fileTypeListH =NULL) and then select one of
these,it gives me always file type=0.
I tried something: I took one of those PICT files from iMovie, read it with
Photoshop and resaved it as a PICT file (with a different name). When I went
again with the debugger following step by step, this file was hilited and the
file type was OK, 'PICT'.
I don't understand what is so special about the iMovie files, with creator 'ttxt'
I did something else: with ResEdit I changed the creator on one of those files
to 'abcd' (arbitrary as you can see) and then it works fine, so positively has
to do with the 'ttxt' file type.
If you have any other suggestion, let me know please.
Thanks
Conrado
> err=NavCreateCooseFileDialog(&NavOptions,fileTypeListH,NULL,NULL,NULL,NULL,&ou
> tDi
[quoted text clipped - 66 lines]
>
> Larry