NSProxy/NSInvocation question
NSProxy/NSInvocation question
- Subject: NSProxy/NSInvocation question
- From: Paul Forgey <email@hidden>
- Date: Mon, 28 Jun 2010 15:20:14 -0700
I am writing an NSProxy subclass to generically marshal and forward invocations. I have read previous mailing list posts on this topic.
For reasons I cannot explain and shouldn't be happening according to my interpretation of the documentation, [NSInvocation selector] is throwing an NSInvalidArgumentException:
- (void)forwardInvocation:(NSInvocation *)invocation
{
NSString *selName = NSStringFromSelectorName([invocation selector]);
at this point:
2010-06-28 15:12:39.694 Monotest[23948:a0f] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSInvocation getArgument:atIndex:]: index (1) out of bounds [-1, 0]'
*** Call stack at first throw:
(
0 CoreFoundation 0x95351bba __raiseError + 410
1 libobjc.A.dylib 0x98f26509 objc_exception_throw + 56
2 CoreFoundation 0x952f7c31 -[NSInvocation getArgument:atIndex:] + 225
3 CoreFoundation 0x952f8958 -[NSInvocation selector] + 56
even an empty NSInvocation shouldn't be doing that; at the very least, selector is supposed to return 0 if there is no selector set.
_______________________________________________
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