Path: utzoo!attcan!uunet!samsung!uakari.primate.wisc.edu!ark1!nems!mimsy!mojo!russotto From: russotto@eng.umd.edu (Matthew T. Russotto) Newsgroups: comp.sys.mac.programmer Subject: Re: SFGetFile File Filter problem Message-ID: <1990Jun28.140424.25252@eng.umd.edu> Date: 28 Jun 90 14:04:24 GMT References: <27161@bcsaic.UUCP> Sender: news@eng.umd.edu (The News System) Organization: College of Engineering, Maryversity of Uniland, College Park Lines: 33 In article <27161@bcsaic.UUCP> lbaum@bcsaic.UUCP (Larry Baum) writes: > >I am trying to get the following code, downloaded from apple.com (Mac >DTS Sample Code #18). It is a file filter for SFGetFile so that only >files with ALRT resources are shown. > >This code is for MPW C and I am using Think C. > >When I tried this, I first encouneter a bus error at: > > oldResLoad = *(Boolean *)ResLoad; > >I changed that to: > > oldResLoad = ResLoad; > If you caught this one, you are going to kick yourself for not catching the next one :-) >The trouble is that > > PBOpenWD(&WDRec,false); > >consistently fails with resErr = -35. Not resErr. ioErr. > WDRec.ioWDDirID = *(long *)CurDirStore; > > PBOpenWD(&WDRec,false); Try WDRec.ioWDDirID = CurDirStore -- Matthew T. Russotto russotto@eng.umd.edu russotto@wam.umd.edu ][, ][+, ///, ///+, //e, //c, IIGS, //c+ --- Any questions?