Re: How to write a dictionary into an output file
Re: How to write a dictionary into an output file
- Subject: Re: How to write a dictionary into an output file
- From: j o a r <email@hidden>
- Date: Tue, 6 Jun 2006 16:17:57 +0200
On 6 jun 2006, at 16.07, Julio Bianco wrote:
You tell me this dictionary was not properly set up, then how can I
set it up to be written correctly taking in consideration that I'm
not using any estrange class or object, but a string and an integer
as key an value? I don't know if I need to do something else I am
not performing, because I have exactly that I send you, and it
doesn't work.
The keys needs to be strings when using property list serialization.
Change your code to something like this:
NSDictionary *LogFile1 = [[NSDictionary alloc] initWithObjectsAndKeys:
@"one", [NSString stringWithFormat: @"%d", 1],
nil];
It's not obvious that it should work this way, as NSNumber is also a
valid property list class, but at least it's (now) a documented
limitation:
<http://developer.apple.com/documentation/Cocoa/Conceptual/
PropertyLists/Concepts/AboutPropertyLists.html#//apple_ref/doc/uid/
20001010-BBCBDBJE>
j o a r
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden