On 22/08/2013, at 1:03 AM, Shane Stanley <sstan...@myriad-com.com.au> 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 (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to