Path: utzoo!attcan!uunet!lll-winken!lll-lcc!ames!claris!apple!darin From: darin@Apple.COM (Darin Adler) Newsgroups: comp.sys.mac.programmer Subject: Re: Setting default directories Message-ID: <13520@apple.Apple.COM> Date: 8 Jul 88 02:49:57 GMT References: <1409@murdu.OZ> Reply-To: darin@apple.apple.com.UUCP (Darin Adler) Organization: Apple Lines: 19 In article <1409@murdu.OZ> grae@murdu.OZ (Graeme Gerrard) writes: > Now, I have read TechNote #140 about the dangers > of using PBHSetVol, but my eyes just glaze over. Hence, I, a mere mortal > and novice Mac programmer, blame PBHSetVol - but it could be circumstantial. > (I have been able to get the DirID of the > directory with just the ioNamePtr using PBGetCatInfo, but it > doesn't set the dir so I can open the resource fork as in step 4 above.) Well, one thing I can tell you right away is that OpenResFile (or OpenRFPerm) and PBHSetVol do *not* get along, as TN 140 mentions. Calling PBHSetVol and then trying to use OpenResFile is no use! OpenResFile will ignore the dirID component of the current directory. You *must* open a working directory before opening a resource file in that directory (with OpenRFPerm). Some of this will probably be alleviated with the new glue in MPW 3.0, which may include a new routine, HOpenResFile, that allows you to open a resource file in a directory without creating a working directory with OpenWD. Darin Adler AppleLink: Adler4 UUCP: {sun,voder,nsc,mtxinu,dual}!apple!darin CSNET: darin@Apple.com