bug-gnustep
[Top][All Lists]
Advanced

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

Re: method writeToFile


From: Richard Frith-Macdonald
Subject: Re: method writeToFile
Date: Mon, 16 Jun 2003 13:08:52 +0100


On Monday, June 16, 2003, at 02:57  pm, Miroslav Novy wrote:

Hi,
  I have a problem with using the method writeToFile: atomically: in
class NSDictionary on gnustep-base 1.6.0 on solaris 2.8 (sparc) with gcc
2.95.3 (or gcc 3.2.1). I have created a dictionary with values of class
NSNumber. For example:

dct={i0 = 0; i1 = 1; i2 = 2; i3 = 3; i4 = 4; i5 = 5; i6 = 6; i7 = 7; i8
= 8; i9 = 9; }

When I wrote it onto disk with method writeToFile: atomically: , the file
is not correct:

 {
      i0 = <*BN>;
      i1 = <*BY>;
      i2 = <*I2>;
      i3 = <*I3>;
      i4 = <*I4>;
      i5 = <*I5>;
      i6 = <*I6>;
      i7 = <*I7>;
      i8 = <*I8>;
      i9 = <*I9>;
 }

That's writing the dictionary as a property list using the current format ... which supports numeric values where reading the property list back in.

If you want the old-style property list format, where numeric values will be read back in as NSString instead of NSNumber, you can set the NSWriteOldStylePropertyLists user default to YES.





reply via email to

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