Re: Dictionary
Re: Dictionary
- Subject: Re: Dictionary
- From: "I. Savant" <email@hidden>
- Date: Fri, 24 Aug 2007 17:47:53 -0400
On Aug 24, 2007, at 5:33 PM, Dallas Brown wrote:
Is it possible, and if so, how, to have a dictionary where one or
more values for a key is an array?
Yes, it is. The how is, "exactly how the documentation says". Set
the array as the object for some key using -setObject:forKey:
NSArray * myArray = [NSArray arrayWithObjects:[NSNumber numberWithInt:
0], [NSNumber numberWithInt:1], nil];
NSMutableDictionary * myDictionary = [NSMutableDictionary dictionary];
[myDictionary setObject:myArray forKey:@"someKey"];
--
I.S.
_______________________________________________
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
References: | |
| >Dictionary (From: Dallas Brown <email@hidden>) |