On Sunday, May 19, 2002, at 03:25 PM, Alain Pastor wrote: > Pete Beaumont wrote: > >> Thanks Alain. >> I'll see if I ca get the code to work in my project. >> >> Why do you have a period in the var type declarations: >> ( fSpec AS .FSSpec, pb AS .CInfoPBRec) >> > For some time now I have started to use this shortcut for PTR TO, this > is just a matter of taste. For common types it shows immediately that > you are working with pointer vars (or a handles) because it hilites > differently in the editor (OK this is not relevant with the above > example); point also reminds me of pointer; and the dot goes through > emails without problem has opposed to the ^ symbol. > Thanks Alain. I was a bit confused. Pete… (the other one) > Searching FSpGetCatInfo with the Toolbox info plug-in, I was sent to > Apple's Web site and I saw they propose a wrapper written a bit > differently, so below is their implementation adapted for FB^3: > > Include "Tlbx Files.Incl" > > Local Fn FSpGetCatInfo( fSpec As .FSSpec,¬ > dirIndex As Integer,¬ > pb As .CInfoPBRec ) > > pb.ioVRefNum = fSpec.vRefNum > pb.ioDirID = fSpec.parID > pb.ioNamePtr = @fSpec.name > pb.ioFDirIndex = dirIndex > > End Fn = Fn PBGetCatInfoSync( pb ) > > // main test > Dim pb As CInfoPBRec > Dim f As FSSpec > > gFBUseNavServices = _zTrue > > Long If Len( Files$( _FSSpecOpen, "", "", f ) ) > Def Blockfill( pb, Sizeof(CInfoPBRec), 0 ) > Long If Fn FSpGetCatInfo( f, 0, pb ) == _noErr > Print Pstr$( pb.ioNamePtr ) > Print Mki$( pb.ioFlFndrInfo.fdType ),¬ > Mki$( pb.ioFlFndrInfo.fdCreator ) > End If > End If > > Do > HandleEvents > Until _nil > > -- > Cheers, > > Alain > ------------------------------------------------------ > Program different > > E = FB^3 > > FutureBASIC^3 in Europe: http://euro.futurebasic.com/ > ------------------------------------------------------ > > -- > To unsubscribe, send ANY message to <futurebasic- > unsubscribe@...> >