[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GNUstep directory in userhome

From: Richard Frith-Macdonald
Subject: Re: GNUstep directory in userhome
Date: Mon, 5 Mar 2001 23:15:34 +0000

On Monday, March 5, 2001, at 06:53 PM, Jonathan Gapen wrote:

> > Would it be possible, to make the location of the defaults database 
> > variable? Why doesn't NSUserDefaults read the environment variable 
>     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.

The defaults database can be loaded for different users, wheras the 
environment variable is only for the current user.  That's probably why the 
system doesn't use GNUSTEP_USER_ROOT ... it would break the current behavior.
As it stands, you can (if you are root) modify any users defaults database 
using the
defaults command, and an s-bit program can call GSSetUser() to change the user 
it is
running as, and then work with defaults for that user.  This is a GNUstep 
to the API ... but a useful one.

>     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. 

Yep ... contributed code to provide an alternative implementation for windoze
would be gladly accepted (assuming it works, conforms to GNUstep coding
conventions, and comes with the appropriate copyright assignment of course).

reply via email to

[Prev in Thread] Current Thread [Next in Thread]