> Of course it is. Suppose for a minute that [myMutableDictionary allValues] > returned a mutable array. That means that you could add to and remove from > this array with impunity. > > Except... the objects in this array are supposed to have an associated key.
Um, no they aren't. Arrays don't have "keys". What you are returned is an arbitrary array that was initially populated with all the objects in the dictionary. There is no implied linkage back to the dictionary. Adding another object to the dictionary is not going to make a new object appear in the array; why should adding an object in the array make it appear in the dictionary? (Note, adding an object to the dictionary might make the *property* allValues return something different, but that's a different topic) _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com