• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSDictionary allValues not mutable
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSDictionary allValues not mutable


  • Subject: Re: NSDictionary allValues not mutable
  • From: Uli Kusterer <email@hidden>
  • Date: Tue, 19 Oct 2010 23:41:53 +0200

On 09.10.2010, at 21:59, Trygve Inda wrote:
> [myDict allValues] gets the correct array and works in the table, but it is
> made immutable. Is there any better way to keep the mutability other than
> using allKeys then stepping through each one, obtaining its object and
> adding it to an NSMutableArray that I made with alloc/init?
> Why doesn't allValues simply preserve the mutability? I would have guessed
> that internally it did the above steps.

There is no "keep the mutability". An NSDictionary probably doesn't even use an array internally to store its values. It probably uses some kind of tree data structure or whatever. The array is very likely created specially for you when you call allValues.

Cheers,
-- Uli Kusterer
"The Witnesses of TeachText are everywhere..."
http://groups.yahoo.com/group/mac-gui-dev/

_______________________________________________

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: 
 >NSDictionary allValues not mutable (From: Trygve Inda <email@hidden>)

  • Prev by Date: Re: Framework Major versions
  • Next by Date: Re: NSDictionary allValues not mutable
  • Previous by thread: RE: NSDictionary allValues not mutable
  • Next by thread: Re: NSDictionary allValues not mutable
  • Index(es):
    • Date
    • Thread