[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: GNUstep directory in userhome
From: |
Jonathan Gapen |
Subject: |
Re: GNUstep directory in userhome |
Date: |
Mon, 05 Mar 2001 12:53:05 -0600 |
> ----- Original Message -----
> From: "Richard" <richard@brainstorm.co.uk>
> > Are you sure you will never want to use the NSUserDefaults class?
> > It's used for all sorts of things - localisation for instance.
Michael Scheibler wrote:
>
> NSUserDefaults.m:
> /* User's Defaults database */
> static NSString *GNU_UserDefaultsPrefix = @"GNUstep";
> static NSString *GNU_UserDefaultsDatabase = @".GNUstepDefaults";
> static NSString *GNU_UserDefaultsDatabaseLock = @".GNUstepUDLock";
>
> Would it be possible, to make the location of the defaults database
> variable? Why doesn't NSUserDefaults read the environment variable
> GNUSTEP_USER_ROOT?
Perhaps this code was written before the use of the $GNUSTEP_*_ROOT
variables was added, or perhaps the user defaults database is considered
too important to leave to chance? You want it always in the same spot,
even if $GNUSTEP_USER_ROOT gets messed up, or not set. It's not too
hard to change the path of the user defaults database to remove the
"GNUstep" directory, or to stick it into "Application Data" (which would
be a better place for it in a Windows user profile directory).
I think there's a better long term solution, though: Write a
Windows-specific version of NSUserDefaults that sticks its values in
HKEY_CURRENT_USER in the Windows registry. This should be just a matter
of writing some glue code to map values from the registry into an
NSDictionary, as the registry is already a hierarchy of key-value pairs,
just like NSUserDefaults should be.
--
All persons, living or dead, are purely coincedental.