Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSDictionary and NSMutableDictionary



On Donnerstag, August 15, 2002, at 07:09 Uhr, malcom wrote:

Hi,

It's possible to make a multiple elements NSDictionary without use NSMutableDictionary?

NSDictionary dict = new NSDictionary(value1,key1,value2,key2....);

The compiler encounter an error if i try to make this. I need to make

NSMutableDictionary dict = new NSMutableDictionary();
dict.setObjectForKey(value1,key1);
dict.setObjectForKey(value2,key2);



You can use the following constructor:

NSDictionary(Object[] objects, Object[] keys)


Creates an NSDictionary with entries from the contents of the keys and objects arrays.


Regards,

Cyril
_______________________________________________
java-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/java-dev
Be sure to read the FAQ http://developer.apple.com/java/faq/ before posting
Do not post admin requests to the list. They will be ignored.

References: 
 >NSDictionary and NSMutableDictionary (From: malcom <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.