Re: -[NSProxy doesNotRecognizeSelector: error
Re: -[NSProxy doesNotRecognizeSelector: error
- Subject: Re: -[NSProxy doesNotRecognizeSelector: error
- From: Graham Cox <email@hidden>
- Date: Thu, 22 Aug 2013 07:42:20 +0200
On 22/08/2013, at 1:03 AM, Shane Stanley <email@hidden> wrote:
> *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[NSProxy doesNotRecognizeSelector:unCompileWith:at:and:] called!'
> terminate called throwing an exception
> Right, that's the method I posted earlier. I just can't see any problem with it. The target is not likely to disappear.
Is there is any possibility that 'self' is not what you think it is? If that's confused, then the proxy is simply reflecting the fact that the object 'self' points to doesn't respond to the selector (since its own -respondsToSelector: method just calls the target's).
> It's called in a block using:
>
> [[NSOperationQueue mainQueue] addOperationWithBlock:^{
Is there a good reason to do this? Adding an operation to the main queue doesn't really give you much. Blocks complicate things. If you can just call your undo manager -prepareā¦ directly at the point where it's needed, it might flush out the problem, or even fix it.
> Thanks for the pointer. Most of my undoing is coming for free via text views -- is that likely to be a problem with GCUndoManager?
It shouldn't, but the more I think about it, the more I don't think it's going to help much in this case. GCUndoManager uses a proxy in exactly the same way so the same problem is going to be there and the problem isn't with undo manager but with the caller.
--Graham
_______________________________________________
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