darth@athena.mit.edu (Darren T Garnier) (01/22/91)
I understand that in system 7.0 there will be a "folder manager". Will this control things like preference files? If so, how would I look for such a folder? Also, the compatibility guidelines say that one should not use SysEnvirons while Gestalt is available. However, how else do you get the info for the system or "blessed" folder. I can't see how you can get this from Gestalt. Is there something in the Desktop Mgr that I can use? It seems to me that there should be a standard way to keep pref files around. Once again, any help or idle speculation would be greatly appreciated. darren. -- Darren Garnier darth@athena.mit.edu | Some rise, some fall, garnier@alcvax.pfc.mit.edu | some try to get to Terrapin.
jln@casbah.acns.nwu.edu (John Norstad) (01/23/91)
In article <1991Jan21.222056.2402@athena.mit.edu> darth@athena.mit.edu (Darren T Garnier) writes: > I understand that in system 7.0 there will be a "folder manager". Will > this control things like preference files? If so, how would I look for > such a folder? > Also, the compatibility guidelines say that one should not use SysEnvirons > while Gestalt is available. However, how else do you get the info for > the system or "blessed" folder. I can't see how you can get this from > Gestalt. Is there something in the Desktop Mgr that I can use? It seems > to me that there should be a standard way to keep pref files around. > Once again, any help or idle speculation would be greatly appreciated. System 7.0 has a new "FindFolder" routine for finding the various new special folders inside the System Folder (Preferences, Extensions, Control Panels, etc.). You can use Gestalt to find out if the FindFolder routine is present, using the gestaltFolderAttr environmental selector. If you want your program to work on both 7.0 and pre-7.0 systems, you should call Gestalt to see if FindFolder is present. If it is, call it to locate the subfolder you want. If FindFolder is not present, use old pre-7.0 techniques to locate and use the currently active System Folder. I use this technique in my program for my prefs file, and it works fine. See the draft of Inside Mac vol VI on the 7.0b1 CD for more details. Gestalt is documented in Chapter 3, "Compatibility Guidelines." FindFolder is documented in chapter 9, "The Finder Interface." John Norstad Academic Computing and Network Services Northwestern University jln@casbah.acns.nwu.edu