[futurebasic] FINDERINFO

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : September 1999 : Group Archive : Group : All Groups

From: "Phil Yates" <phil.yates@...>
Date: Mon, 13 Sep 1999 14:39:29 +0100
Does anyone know any circumstances where FINDERINFO doesn't work ?

I already use this Function (from the Function Library) in several programs,
and it works fine :

€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€
' €          €€ Checks if there's an incoming file
€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€
'
CLEAR LOCAL
DIM doWhat%,count%
LOCAL FN CheckIncomingFiles
  DIM 31 fname$(4)
  DIM    type&(4)
  DIM    volRefNum%(4)
  DIM    maxFiles%
  maxFiles% = 0
  doWhat% = FINDERINFO (maxFiles%,fname$(0),type&(0),volRefNum%(0))
  DEFSTR LONG
  LONG IF maxFiles% > 0
    IF maxFiles% > 5 THEN maxFiles% = 5
    FOR count% = 0 TO maxFiles% - 1
      gInFileName$(count% + 1) =  fname$(count%)
      gInFileType$(count% + 1) =  MKI$(type&(count%))
      gInVol%(count% + 1)      =  volRefNum%(count%)
    NEXT count%
  END IF
  DEFSTR WORD
END FN = maxFiles%

€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€

But I'm working on a new program where it just doesn't work - returns
maxFiles% as Zero every time, whatever I do.

The Program is compiled, with all the file types set in the BNDL resource -
I"ve even added a "****" type. If I drag a file onto the Application, it
highlights as it should. If I double-click a file, it runs the application
OK.

All the program file Icons are correct on the desktop, and there's only one
copy of the application. I've rebuilt the desktop. The COMPILE instructions
are the same as for programs where this function does work.

The ONLY difference I can make out is that the BNDL Resource has 22 file
types, but this isn't affecting the Icons or anything else, AFAIK.

Head banging time again. Anyone got any suggestions ?

Phil.