Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!swrinde!ucsd!ogccse!blake!ndsuvax!nopuklic From: nopuklic@ndsuvax.UUCP (Blayne Puklich) Newsgroups: comp.sys.mac.programmer Subject: Re: Preferences Folder Message-ID: <2986@ndsuvax.UUCP> Date: 4 Oct 89 21:03:47 GMT References: <835zebolskyd@yvax.byu.edu> Reply-To: nopuklic@ndsuvax.UUCP (Blayne Puklich) Organization: North Dakota State University, Fargo Lines: 37 In article <835zebolskyd@yvax.byu.edu> zebolskyd@yvax.byu.edu writes: > >When using HFS, look for a folder named "Preferences" in BootDrive (which >I assume is still the working directory reference number for the current >System's directory). Open or create it. Keep your preference file in there >under the name of the application + Prefs (i.e., "Clarus Prefs"). If there >is already a file with that name and not your creator type, throw a fit. > >I plan to keep the name of the Preferences folder in an 'STR ' resource >in the app. so furriners can change it to whatever is appropriate. > >--Lyle D. Gunderson zebolskyd@yvax.byu.edu Since you'll more than likely want the preferences file to be associated with your application somewhat, I think a much better idea would be to have the preferences filename in a FREF resource. Then you can associate an ICN# with it also. And, if the user so wishes, the application can be launched by opening its preferences file. It's very easy to then pull the filename of that preference file out of the FREF in the application resource fork by using a struct such as: typedef struct FREF { OSType type; short localIconID; Str255 fileName; } FREF, **HFREF; Let's discuss this... ||+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++|| || Blayne Puklich nopuklic@Plains.NoDak.EDU "I think I'm going || || NDSU Student ACM nopuklic@ndsuvax.BITNET bald..." || || Vice-Chairperson NU087763@NDSUVM1.BITNET -- Rush, from Caress || || North Dakota State University, Fargo, ND of Steel, 1975 || || (701) 237-4408 || || "Corvettes are the best thing man has ever invented." || ||-------------------------------------------------------------------------||