gardner@prls.UUCP (Robert Gardner) (12/22/87)
And now yet another SFGetFile() question! The help I've gotten from the net on all my various and sundry questions has sure been appreciated. I want to filter out all opened files during SFGetFile calls. What seemed easiest was to just check the ioRefNum field of the parameter block against 0, since ioRefNum is supposed to contain a file's reference number if the file is open (interesting, Inside Mac doesn't say what it contains if the file is NOT open...). This works just fine on my Mac+. However, when I try the same procedure on a 64K ROM Mac EVERY file looks open -- i.e. it's ioRefNum field is non-zero. I haven't yet figured out what the field is... haven't had time to configure TMON for that Mac. Well, we haven't yet given up on 64K ROM machines, but worse, if this method fails on 64K ROM machines, will it fail on SE's, Mac II's, or future machines? So, I guess the real question is, is there a foolproof way to tell from within SFGetFile() filters whether or not a given file is already open? Thank you, Robert Gardner
gardner@prls.UUCP (Robert Gardner) (12/22/87)
I tried posting this earlier but it apparently got lost. Sorry if this subject appears twice... I have another problem with SFGetFile() (the responses to the last one were much appreciated). I want to filter out all open files. I have tried just checking the ioRefNum field since IM says that this will contain the file's reference number if the file is open (but it doesn't say what it will contain if the file is closed!). If ioRefNum is 0 then I assume the file is closed. This works fine on the Mac+ but does NOT work on 64K ROM machines. On 64K ROM machines my filter thinks that EVERY file is open. Since this works on 128K ROMs but not on 64K ROMs I am worried about how it will work on newer machines. Also, no one seems to be willing to completely give up on 64K ROM machines yet so I still have to find a way that works for older Macs. Thank you, Robert Gardner