bug-gnustep
[Top][All Lists]
Advanced

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

Re: Problem with NSColor/NSString initialisation


From: Richard Frith-Macdonald
Subject: Re: Problem with NSColor/NSString initialisation
Date: Mon, 23 Apr 2001 09:56:35 +0100

On Saturday, April 21, 2001, at 06:11 PM, Fred Kiefer wrote:

Somehow GNUstep sets up the C Local on the first call to NSLog, so when
I did insert this call the float representation stored for the colours
includes commas and will be interpreted later on correctly by sscanf().
If the call comes a bit later the initialization of the colour strings
has been done with the standard local, and cannot be interpreted
correctly by sscanf() later on.

I see two solutions to this, we either drop the standard setlocal()
call, which would eliminate all these problems, but would also reduce
the functionality of GNUstep. Or we make sure the the setlocal() call is
made before any local information is used. For NSColor this can be done
very easily, so I added that code (a call to [NSUserDefaults
standardUserDefaults]) here.

I have modified the GNUsttep-base code to initialise the locale from
the [NSObject +initialise] method.  I don't think this should cause
any trouble.  Please let me know if it solves the problems for you.



reply via email to

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