• 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: mutableSetValueForKey:, addObject:, and selector not found
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: mutableSetValueForKey:, addObject:, and selector not found


  • Subject: Re: mutableSetValueForKey:, addObject:, and selector not found
  • From: Chris Hanson <email@hidden>
  • Date: Thu, 2 Jun 2005 09:11:59 -0700

On Jun 2, 2005, at 1:37 AM, Niko Matsakis wrote:
When I try to run the following Core Data code:


NSMutableSet *mutset = [langobj mutableSetValueForKey:@"vocabulary"];
[mutset addObject:words[i]];


I get some error during the call to addObject: call; specifically:


2005-06-02 10:19:13.320 Flash[25280] *** -[_NSFaultingMutableSet objectAtIndex:]: selector not recognized [self = 0x351850]
2005-06-02 10:19:13.325 Flash[25280] *** -[_NSFaultingMutableSet objectAtIndex:]: selector not recognized [self = 0x351850]
2005-06-02 10:19:13.342 Flash[25280] *** -[_NSFaultingMutableSet objectAtIndex:]: selector not recognized [self = 0x351850]
2005-06-02 10:19:13.343 Flash[25280] *** -[_NSFaultingMutableSet objectAtIndex:]: selector not recognized [self = 0x351850]
2005-06-02 10:19:14.897 Flash[25280] Cannot create BOOL from object (1) of class NSCFArray

One thing you might want to check are your bindings. Make sure that you have no bindings set up in your interface that might assume they're dealing with an array though they're really dealing with a set.


Also, when you get exceptions like this it's useful to set breakpoints on the following methods and functions:

  -[NSException raise]   (for old-style exceptions)
  objc_exception_throw   (for new-style exceptions)

That way, you'll break very close to the source of the exception.

You can set these up symbolically in the debugger's Breakpoints window. Often the backtrace you get when the exception occurs can be a very good clue as to what's going on.

  -- Chris

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >mutableSetValueForKey:, addObject:, and selector not found (From: Niko Matsakis <email@hidden>)

  • Prev by Date: Re: Custom cell in NSTableView
  • Next by Date: Re: Manual KVO and will/didChangeValueForKey
  • Previous by thread: Re: mutableSetValueForKey:, addObject:, and selector not found [RESOLVED]
  • Next by thread: Drags to Finder result in XML clippings [SOLVED]
  • Index(es):
    • Date
    • Thread