• 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: Integer as key in NSMutableDictionary
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Integer as key in NSMutableDictionary


  • Subject: Re: Integer as key in NSMutableDictionary
  • From: Nick Zitzmann <email@hidden>
  • Date: Mon, 4 May 2009 23:59:58 -0600


On May 4, 2009, at 11:52 PM, Weydson Lima wrote:

when I use
the removeObjectForKey, how can I make a reference to a specific key? Let's
say I want to remove key that was initialized with [NSNumber
numberWithInt:1]. If I call removeObjectForKey:[NSNumber numberWithInt:1],
that method won't work because a new NSNumber pointer is being created,
correct?


No, it will work because NSDictionary checks the value of the pointer, not the address of the pointer.

Nick Zitzmann
<http://www.chronosnet.com/>



_______________________________________________

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: 
 >Integer as key in NSMutableDictionary (From: Weydson Lima <email@hidden>)
 >Re: Integer as key in NSMutableDictionary (From: Alexander Heinz <email@hidden>)
 >Re: Integer as key in NSMutableDictionary (From: Jean-Daniel Dupas <email@hidden>)
 >Re: Integer as key in NSMutableDictionary (From: Weydson Lima <email@hidden>)

  • Prev by Date: Re: Integer as key in NSMutableDictionary
  • Next by Date: Re: how to combine addObject in mutablearray with Object instantiation?
  • Previous by thread: Re: Integer as key in NSMutableDictionary
  • Next by thread: Re: Integer as key in NSMutableDictionary
  • Index(es):
    • Date
    • Thread