discuss-gnustep
[Top][All Lists]
Advanced

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

Re: bug in NSUserDefaults


From: Nicola Pero
Subject: Re: bug in NSUserDefaults
Date: Sun, 10 Feb 2002 14:24:48 +0000 (GMT)

> > I've spent the last few hours trying to install GNUstep with
> > GNUSTEP_USER_ROOT=~ instead of =~/GNUstep
> > and I've noticed that there's a quite serious but in NSUserDefaults, the
> > GNUSTEP_USER_ROOT is hardcoded in it.
> 
> I don't think that's a bug ... the GNUSTEP_USER_ROOT environment 
> variable is intended to define one of the places where you can find 
> application, libraries and other resources.  That doesn't mean that 
> *all* resources will or should be stored there.

Well - I agree that the location of user defaults needs not necessarily be
inside GNUSTEP_USER_ROOT.  I also agree with you that making the user
defaults location configurable is not as easy as it seems ... and that
binding it to GNUSTEP_USER_ROOT is not going to work.

But it would be nice if there was a simple way of changing the location of
the user defaults ... perhaps at configure/compile time, and for the whole
framework.  It's difficult to imagine all the possible systems and
configurations - knowing that each system is different and each system
administrator's (/user's) tastes are different, and that the library is
being ported to very different systems, I think it would be a good
(useful) configuration option to have.

Ideally, it would be nice to have a ./configure switch to gnustep-base
telling it where to read/store the user defaults.  I'm not sure how to
make it work ... it should be possible to choose ~/.GNUstepDefaults or
~/GNUstep/.GNUstepDefaults (the default) or something like
/opt/GNUstep/Users/$USER/.GNUstepDefaults ...  or perhaps even.  Perhaps
you could allow a string containing $USER and/or $HOME, and store that
into the gnustep-base library.  At runtime the gnustep-base library would
build the user defaults path by replacing the $USER and $HOME in the
string with the ones of the user it wants to look up the user defaults
for.  That should be enough powerful to satisfy at least the current
configuration requests.

Then, to have GNUSTEP_USER_ROOT be ~ and the user defaults in
~/.GNUstepDefaults, you would configure gnustep-make using

./configure --with-user-root='~'

and gnustep-base using

./configure --with-user-defaults-path='$HOME'

I suppose some variant of this suggestion might actually work :-) (some
variant because I didn't consider the font cache - but need to go out now)




reply via email to

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