• 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: Property list file with NSNumber objects as keys
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Property list file with NSNumber objects as keys


  • Subject: Re: Property list file with NSNumber objects as keys
  • From: Roland King <email@hidden>
  • Date: Mon, 4 Oct 2010 20:55:31 +0800

http://developer.apple.com/library/mac/#documentation/cocoa/Conceptual/PropertyLists/AboutPropertyLists/AboutPropertyLists.html#//apple_ref/doc/uid/10000048i-CH3-46719-CJBIGFCD

No. writeToFile: writes a property list representation of the dictionary and from the above you can see that NSDictionary must have String keys to be a property list.

You could turn it into NSData and write it like that perhaps.

On 04-Oct-2010, at 8:45 PM, Remco Poelstra wrote:

> Hi,
>
> In the NSDictionary documentation it is stated that NSNumber objects are valid property list objects.
> But when I create a dictionary with NSNumbers as keys, writeToFile: fails. If I use strings, then it succeeds. Is it possible to use NSNumbers as keys and have the, read/written from/to file?
> Thanks in advance.
>
> Kind regards,
>
> Remco Poelstra
>
> _______________________________________________
>
> Cocoa-dev mailing list (email@hidden)
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Property list file with NSNumber objects as keys
      • From: Remco Poelstra <email@hidden>
References: 
 >Property list file with NSNumber objects as keys (From: Remco Poelstra <email@hidden>)

  • Prev by Date: Re: Instantly delete a directory without recursion?
  • Next by Date: Re: Property list file with NSNumber objects as keys
  • Previous by thread: Property list file with NSNumber objects as keys
  • Next by thread: Re: Property list file with NSNumber objects as keys
  • Index(es):
    • Date
    • Thread