September 2002
Intermediate to advanced
1272 pages
31h 12m
English
When objc_msgSend(id self, SEL op, ...) and objc_msgSendSuper(struct objc_super *super, SEL op, ...) fail to find a method that corresponds to the selector of a received message, the –forwardInvocation: method implemented by the NSObject class is called. The argument to –forwardInvocation: is an instance of the NSInvocation class initialized with information about the message that could not be handled including the selector and any arguments.
The default implementation of –forwardInvocation: calls [self doesNotRecognizeSelector:aSelector]. The –doesNotRecognizeSelector: method raises an exception. If –forwardInvocation: is overloaded, it can be implemented to find another receiver for the message ...
Read now
Unlock full access