[Contents] [Index] [Help] [Retrace] [Browse <] [Browse >]

A Custom CxObject has the power to directly manipulate the CxMessages that
travel around the Commodities network.  One way is to directly change
values in the corresponding input event.  Another way is to redirect (or
dispose of) the CxMessages.

    void DivertCxMsg ( CxMsg *cxm, CxObj *headobj, CxObj *retobj );
    void RouteCxMsg  ( CxMsg *cxm, CxObj *co );
    void DisposeCxMsg( CxMsg *cxm );

DivertCxMsg() and RouteCxMsg() dictate where the CxMessage will go next.
Conceptually, DivertCxMsg() is analogous to a subroutine in a program; the
CxMessage will travel down the personal list of a CxObject (headobj in the
prototype) until it gets to the end of that list.  It then returns and
visits the CxObject that follows the return CxObject (the return CxObject
in the prototype above is retobj).  RouteCxMsg() is analogous to a goto in
a program; it has no CxObject to return to.

DisposeCxMsg() removes a CxMessage from the network and releases its
resources.  The translate CxObject uses this function to remove a

The example Divert.c shows how to use DivertCxMsg() as well as a
signal CxObject.


[Back to Amiga Developer Docs]