mikek@hpvcla.HP.COM (Mike Kirkpatrick) (05/17/88)
Statement of situation: I want to set a particular directory as the current working directory such that when I issue an SFGetfile, the user is at the expected location for the file pick. I know the name of the directory but not the name of the file. Problem: Using a combination of PBHSetVol, PBHGetVol, and PBOpenWD I have changed the current working directory using an absolute path to PBHSetVol and set (WD?)DirID with PBHGetVol, and then opened it with PBOpenWD. When SFGetfile is called, it opens the application's directory, not the one I set. What gives? Can someone give me a hint? Finder/System: 6.0/4.2 Program Lang: TML Pascal Mike Kirkpatrick ihnp4!hpfcla!hpvclx!mikek
lsr@Apple.COM (Larry Rosenstein) (05/20/88)
In article <12050002@hpvcla.HP.COM> mikek@hpvcla.HP.COM (Mike Kirkpatrick) writes: >Statement of situation: I want to set a particular directory as the current >working directory such that when I issue an SFGetfile, the user is at the >expected location for the file pick. I know the name of the directory but >not the name of the file. See page IV-72 of Inside mac volume 4. Basically, there are 2 low memory globals to control this. SFSaveDisk contains the negative of the volume refnum of the volume. CurDirStore contains the dirID on that volume. These values are set by the Std File package as the user navigates through the directory hierarchy. You can set these values before calling Std File to determine which folder appears initially. Setting the current volume has no relationship to the directory Std File will bring up initially. -- Larry Rosenstein, Object Specialist Apple Computer, Inc. 20525 Mariani Ave, MS 27-AJ Cupertino, CA 95014 AppleLink:Rosenstein1 domain:lsr@Apple.COM UUCP:{sun,voder,nsc,decwrl}!apple!lsr