I'm trying to implement a callback using an NSInvocation. However,
when i call invoke, i get: "<NSInvalidArgumentException> *** -
[MyTestApp methodSignatureForSelector:]: null selector".
Here is some test code that I am using:
- (void)awakeFromNib {
SEL *handlerSelector = @selector(someMethod: otherArg:);
Here you're passing int pointers to a method that expects normal
ints. Removing the pointer aspect of int *someArg and int *otherArg
should fix that.
[handler invoke];
You need to do setSelector: on handler as well before you invoke it.
Both that setting and the method signature are absolute requirements
when using NSInvocation.
the "someMethod" method is declared in the header file. The error
occurs when calling [handler invoke].
Does anyone out there in cocoa land see the problem? This feels
like a rookie mistake, but as a cocoa rookie, I can't really tell
what that is.
Many thanks,
Keith R. Alperin
kalperin mac com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden