Re: Instance not responding to selector
Re: Instance not responding to selector
- Subject: Re: Instance not responding to selector
- From: Fritz Anderson <email@hidden>
- Date: Wed, 11 Jul 2012 00:02:22 -0500
On 10 Jul 2012, at 11:03 PM, Erik Stainsby wrote:
> Any advice on how I could narrow down what is causing this? I have tried using repondsToSelector: but this doesn't do anything but confirm what the error message states, that the selector is not recognized.
More than that, it states that the selector is not recognized _by RSReactionRule_. Are you sending that message to an RSReactionRule? If you don't think you are, set a breakpoint (presumably somewhere in -addRuleToStore:), and examine the recipient of that message; does the debugger think it's an RSReactionRule?
There are two main reasons an object won't recognize a selector.
- You blundered and wrote code that sent the selector to the wrong object. This is fairly obvious, and the compiler usually urges you not to do it anyway.
- You sent the message via an object pointer that _used_ to point to a legitimate receiver for the selector, but that object had been deallocated, and the address recycled for another object (an RSReactionRule) that doesn't implement it. In other words, the object got (over)released out from under you. Audit your memory management (better, adopt ARC). The Allocations instrument, set to record reference counts and enabling zombie detection, should help you track this down.
Or, maybe there's something esoteric going on with your plugin loading. But I'd look at these two possibilities first.
— F
--
Fritz Anderson -- Xcode 4 Unleashed: Hot on the heels of what Apple has been doing with provisioning! -- <http://x4u.manoverboard.org/>
_______________________________________________
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