• 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
Adding items to NSMutableDictionary
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Adding items to NSMutableDictionary


  • Subject: Adding items to NSMutableDictionary
  • From: Nik Bauman <email@hidden>
  • Date: Wed, 29 Jun 2005 11:21:51 -0700

Okay, this is probably very very simple, but for some reason I can't figure out how to add an entry into a dictionary with any data type other than an NSString. I assume that every data type available in the Property List Editor (string, dictionary, array, number, boolean, date) is supported but Every time I have a value in number or boolean form and use code like this :

NSMutableDictionary *properties = [[NSMutableDictionary alloc] init];
[properties setValue:[NSNumber numberWithInt: integer ] forKey:@"word"];

it never send the right value. The only thing I'm ever successful at is using NSStrings.

How can I input other (I assume supported) data types into dictionaries?

Thanks,
-J. N.
_______________________________________________
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


  • Follow-Ups:
    • Re: Adding items to NSMutableDictionary
      • From: j o a r <email@hidden>
  • Prev by Date: Re: receiving global keyDown events
  • Next by Date: Re: Adding items to NSMutableDictionary
  • Previous by thread: delete in entity with parent/children relationships calls removeChildrenObject: twice?
  • Next by thread: Re: Adding items to NSMutableDictionary
  • Index(es):
    • Date
    • Thread