• 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
NSMutableDictionary member access problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSMutableDictionary member access problem


  • Subject: NSMutableDictionary member access problem
  • From: Hisaoki Nishida <email@hidden>
  • Date: Fri, 25 Jun 2004 16:08:09 -0400

I have some code that accesses an object in a NSMutableDictionary.
The problem is that I can't see the problem.

return [db objectForKey: key];

This is where I get the runtime error saying -[NSCFString objectForKey:]: selector not recognized.

Whenever I ask an object for key "key" in db, I get this error.
And why is it [NSCFString objectForKey:] when it is really [NSMutableDictionary objectForKey:]?

key is a valid NSString, db is a valid NSMutableDictionary with 200 elements in it.
I did initialize key using [NSString stringWithFormat: "%d", int] where int is an integer, but there's nothing wrong with it AFAIK.


Thanks for your assitance,

-Yuki
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: NSMutableDictionary member access problem
      • From: j o a r <email@hidden>
  • Prev by Date: Delaying a drag event
  • Next by Date: KVO on array values -- member edit can't trigger?
  • Previous by thread: Re: Delaying a drag event
  • Next by thread: Re: NSMutableDictionary member access problem
  • Index(es):
    • Date
    • Thread