allKeys and allValues
allKeys and allValues
- Subject: allKeys and allValues
- From: "gMail.com" <email@hidden>
- Date: Mon, 04 Oct 2010 23:21:47 +0200
- Thread-topic: allKeys and allValues
Hi,
On the docs I read that for both the NSDictionary's allKeys and allValues,
the order of the elements in the array is not defined. Ok.
But, are the two arrays aligned each other?
I mean, I have a dictionary containing several entries whose key is, e.g.
@"0", @"3", @"42",...
I show these entries on a tableView picking the dict from the rowIndex.
aDict = [[dicts allValues] objectAtIndex:row];
It works. But now, If I delete a row, using the rowIndex, I should do
NSString *ID = [[dicts allKeys] objectAtIndex:row];
[dicts removeObjectForKey:ID];
Is that correct?
Is it assured that the n key of the allKeys array always corresponds to the
n value in the allValues array?
--
Leo
_______________________________________________
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