discuss-gnustep
[Top][All Lists]
Advanced

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

Re: bug in NSUserDefaults


From: Erik Dalen
Subject: Re: bug in NSUserDefaults
Date: Wed, 13 Feb 2002 18:29:18 +0100

On 2002-02-13 14:36:10 +0000 Richard Frith-Macdonald <richard@brainstorm.co.uk> 
wrote:


On Wednesday, February 13, 2002, at 01:22 PM, Erik Dalen wrote:


> On 2002-02-13 10:50:45 +0000 Richard Frith-Macdonald 
<richard@brainstorm.co.uk>
> wrote:


>> On Wednesday, February 13, 2002, at 10:49 AM, Erik Dalen wrote:


>> >> > So if the GNUSTEP_USER_ROOT is anything else than ~/GNUstep , Services
>> won't
>> >> > work..

>> >> > I'd definitely call that a bug.

>> >> Yes ... can you let me know under what circumstances this happens ... as
>> far
>> >> as I
>> >> know it doesn't.

>> > everytime I load an app..
>> > I tried copying ~/Services to ~/GNUstep/Services and then it worked. The
>> apps
>> > got some services that is.

>> > But make_services builds the list of services in ~/Services
>> Are you using very old code?  As far as I can see the GSServicesManager code
>> was updated to fix this a little
>> over a year ago, and I can't think of anywhere else that's likely to cause
>> this.



> nope, I upgrade to the newest CVS stuff every day.Ok ... found the problem 
... looks like confusion in the way NSSearchPathForDirectoriesInDomas() works
for NSUserDirectory.

Everyone using the function (myself included) assumed it was using 
GNUSTEP_USER_ROOT, where in fact it
was not  - it was taking NSHomeDirectory() and appending /GNUstep ... which is 
the wrong thing to do
by any reckoning ... see below.

ok. That's the way the NSUserDefaults does it as well currently.

However, I'm not entirely sure how it should behave ... in MacOS-X there is no 
equivalent of
GNUSTEP_USER_ROOT, and thus the home directory is always the same as the unix 
users home directory.

In GNUstep, there is a separation between the unix home directory, and the root 
of the users
GNUstep stuff ... the latter is usually a subdirectory of the former.

Perhaps we need another directory key for the function so we can differentiate 
between the two
concepts - but then, should NSUserDirectory refer to the unix home directory, 
or the directory
set by GNUSTEP_USER_ROOT ?

If we make the NSUserDirectory key refer to GNUSTEP_USER_ROOT, then any apps 
ported from MacOS
will be surprised that they do not get to see the contents of the users unix 
home directory.

well, they'd get more surprised if they weren't able to see the gnustep stuff. 
But I think it should point to the same location as GNUSTEP_USER_ROOT.
I also think that the NSUserDefaults should work at that location.

/Erik




reply via email to

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