Important: The information in this document is obsolete and should not be used for new development.
ForwardMessage
You can use theForwardMessage
function to specify the message to be forwarded to the next message handler.
OSErr ForwardMessage (long messageSelector,...);
messageSelector
- The number of the message to be forwarded.
- additional parameters
Parameters associated with the message sent.- function result
- An error of type
OSErr.
DESCRIPTION
TheForwardMessage
function forwards the message specified by themessageSelector
parameter to the next message handler. This function is like theForwardThisMessage
function, except that any message may be forwarded. ThemessageSelector
parameter indicates which message is to be forwarded, as in theSendMessage
function. By definition, all messages return a function result of typeOSErr
.The ellipsis character at the end of the parameter list indicates that the remaining additional parameters are unspecified; the caller must pass whatever parameters are expected by the recipient of the message identified by the
messageSelector
parameter. By definition, all message overrides return a result of typeOSErr
. It is an error to call theForwardMessage
function except from within a message handler. In any other case, behavior is undefined.The
OSErr
error returned may indicate that the message could not be forwarded. If no error occurs, the function result isnoErr
. In addition, the receiving message handler may return an error of typeOSErr
.SEE ALSO
To send a specified message to the current message target, use theSendMessage
function described in the previous section.To forward the current message to the next message handler, use the
ForwardThisMessage
function described in the next section.The use of the
ForwardMessage
function is described in the section "Sending and Forwarding Messages" beginning on page 6-15.