gnustep-dev
[Top][All Lists]
Advanced

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

Re: Colours in user defaults


From: Niels Grewe
Subject: Re: Colours in user defaults
Date: Tue, 8 Sep 2015 06:59:09 +0000

> Am 08.09.2015 um 08:33 schrieb Germán Arias <address@hidden>:
> 
> After update base and gui there is a problems when store colours in user
> defaults. Gemas.app store the colours with something like: 
> 
> [defaults setObject: [NSKeyedArchiver archivedDataWithRootObject: color]
>             forKey: @"EditorInsertionPointColor"];
> 
> but then the Gemas.plist become unusable and can't be used the next
> time. But this worked fine some days ago.
> 
> Germán

Richard made a few changes to property list (de)serialization recently. I 
hazard that this introduced a problem with (de)serializing NSData. Some of the 
tests fail with trunk:

--- Running tests in base/PropertyLists ---

base/PropertyLists/test01.m:
Failed test:     test01.m:147 ... We can generate a property list from data
Failed test:     test01.m:313 ... We can generate a property list from very 
simple data
Failed test:     test01.m:317 ... We can generate a property list from very 
simple data (2)
Failed test:     test01.m:322 ... We can generate a property list from an array 
containing very simple data
Failed test:     test01.m:340 ... We can generate a property list from an array 
containing various things

    127 Passed tests
      5 Failed tests


One or more tests failed.  None of them should have.
Please submit a patch to fix the problem or send a bug report to
the package maintainer.

The tests still pass if you go back to r38951 (before the base64 change for 
GNUstep plain-text property lists). Actually (and that might be unrelated to 
this bug. On my system, defaults are written in the XML format), I’m not really 
comfortable with changing the format this way. It’s fine to support the 
deserialization from base64 <[…]> in NSPropertyListGNUstepFormat, but for 
writing we should have designated a new version of the format (e.g. 
‘NSPropertyListGNUstepFormat_v1’), so that API consumers have to opt into the 
new behaviour explicitly. 

Cheers,

Niels

reply via email to

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