• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: write dictionary to file
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: write dictionary to file


  • Subject: Re: write dictionary to file
  • From: "Gerriet M. Denkmann" <email@hidden>
  • Date: Wed, 9 Apr 2003 08:39:48 +0200

On Mittwoch, April 9, 2003, at 01:29 Uhr, publiclook wrote:

I believe that the documentation clearly states that dictionaries in plists MUST use string keys. I am not sure where it is stated in Apple's documentation, but I remember it. I have also seen it in "Cocoa Programming".


Well, I have not seen this. And it does work with non-string keys quite well.
Tested by:

NSLog(@"my dictionary: %@", totalKnowledge );


On Tuesday, April 8, 2003, at 04:35 PM, Gerriet M. Denkmann wrote:

When I run this small program:

id key = [ NSNumber numberWithInt: 42 ] ;
id value = @"the meaning of life" ;
id totalKnowledge = [ NSDictionary dictionaryWithObjectsAndKeys: value, key, nil ] ;
if ( ![ totalKnowledge writeToFile: @"/tmp/abc.plist" atomically: YES ] )
NSLog(@"confused");

I always get "confused".
I read the docs over and over again, but do not see anything wrong.
Is this a bug, or have I missed something?

Btw: it work of course with key = @"42".

Gerriet.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: write dictionary to file (From: publiclook <email@hidden>)

  • Prev by Date: Re: What does this mean?
  • Next by Date: Re: write dictionary to file
  • Previous by thread: Re: write dictionary to file
  • Next by thread: Re: write dictionary to file
  • Index(es):
    • Date
    • Thread