• 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
What happens after adding an object to a NSMutableDictionary
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

What happens after adding an object to a NSMutableDictionary


  • Subject: What happens after adding an object to a NSMutableDictionary
  • From: Dominic Dauer <email@hidden>
  • Date: Mon, 3 May 2010 22:39:57 +0200

Hello,
I want to add an Object to a NSMutableDictionary:

	if(!parsedClasses)
		parsedClasses = [[NSMutableDictionary alloc] initWithObjectsAndKeys:oneClass,[oneClass objectAtIndex:0],nil];
	else
		[parsedClasses 	setObject:[oneClass retain] forKey:[oneClass objectAtIndex:0]];

After this I remove all objects and keys from the NSMutableArray oneClass to fill it again with other objects.

	[oneClass removeAllObjects];

When I try to access the the objects of parsedClass I see that every object is nil.
What happens after I adding an oneClass MutableArray Object to the parsedClasses MutableDictionary and how can I preserve the oneClass objects in parsedClasses after removing all objects?

Dominic

_______________________________________________

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

  • Follow-Ups:
    • Re: What happens after adding an object to a NSMutableDictionary
      • From: Keary Suska <email@hidden>
  • Prev by Date: Re: Ticker Style Scrolling Text
  • Next by Date: Re: What happens after adding an object to a NSMutableDictionary
  • Previous by thread: Re: Cocoa-dev Digest, Vol 7, Issue 496
  • Next by thread: Re: What happens after adding an object to a NSMutableDictionary
  • Index(es):
    • Date
    • Thread