When an object is sent a message for which it has no method,
the runtime system gives it another chance to handle the call before
giving up. If the object supports a
-forward :: method, the runtime calls this method, passing it
information about the unhandled call. The return value from the
forwarded call is propagated back to the original caller of the
NSObject provide a
-forward:: method, so all objects you are
likely to encounter will behave as described in this section. In each
case, the default behavior, implemented by the root class method, is to
exit the program when an unhandled call is forwarded. Your classes can
override this method to provide alternative behavior; common choices are
to absorb the error or to redirect (forward) the unhandled message to
another object, which is called a delegate
-forward:: method takes a selector and a second parameter that
stores information about the parameters passed to the original
(failed) method call.
The method supplied by GNU's
Object sets off
the following train of events:
-doesNotRecognize : on
passing the selector for the original method call.
-error : passing a format string and the name of the
original method call.
-error: logs an error
message and aborts the program, unless you have overridden this
method or installed an alternative error handler. Section 1.8 discusses this
If you want to just ignore messages ...