Re: Enumerating problems
Re: Enumerating problems
- Subject: Re: Enumerating problems
- From: "Alastair J.Houghton" <email@hidden>
- Date: Sat, 4 Oct 2003 15:52:44 +0100
On Saturday, October 4, 2003, at 03:26 pm, David Dauer wrote:
I load the array
defaults = [NSUserDefaults standardUserDefaults];
MyArray = [[defaults objectForKey:@"key"] retain];
Now I want to create NSMenuItems with the titles "1" and "3" and so on.
My problem is that I don't know how to enumerate through an array
containing
dictionarys and getting everytime a value from the dictionary.
How about something like
NSEnumerator *dictEnum = [myArray objectEnumerator];
NSDictionary *dictionary;
while ((dictionary = (NSDictionary *) [dictEnum nextObject])) {
/* Work with dictionary here */
}
Kind regards,
Alastair.
_______________________________________________
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.