• 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: Dictionary keys
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Dictionary keys


  • Subject: Re: Dictionary keys
  • From: Don Arbow <email@hidden>
  • Date: Wed, 12 Mar 2003 18:06:52 -0800

On Wednesday, March 12, 2003, at 05:26 PM, Hisaoki Nishida wrote:

I get a signal 11 SIGSEGV error when I try to do the following:

[anArray objectForKey:NSStringFromPoint(newPoint)];

anArray is an NSMutableArray, and objects contained in it are stored
with the key NSStringFromPoint(somePoint).
They are both strings, so why wouldn't it work?


Because arrays do not respond to objectForKey messages (you should have gotten a warning about this when compiling). Only dictionaries respond to that message. Not sure how your data is stored, your subject line refers to "Dictionary keys", but you are using an array.

We need more information.

Don
_______________________________________________
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.

References: 
 >Dictionary keys (From: Hisaoki Nishida <email@hidden>)

  • Prev by Date: Re: Dictionary keys(Solved)
  • Next by Date: Re: Hotkey linker problem
  • Previous by thread: Re: Dictionary keys(Solved)
  • Next by thread: Programmatically running a files viewer.
  • Index(es):
    • Date
    • Thread