For example, a very useful mechanism is one based on a view hierarchy where the sender sends messages up the view hierarchy and the receiver is some parent view. The sender doesn't necessarily know that the parent view is there and the receiver doesn't necessarily know that there is a child view that sends something. This situation can easily arise when composing user interfaces with various parts that were designed independently.
The Action Framework makes this kind of implicit communication possible. Figure 53
shows how a parent view can receive an action message from a child view by mixing in the MViewActionHandler and MActionTarget classes. The sender sends a TViewAction using a TViewActionDistributor. View actions contain a standard text string for the message.
Intermediate views in the view hierarchy do not need to do anything to support actions passing by them. In particular, they do not have to manually pass the action to the parent view. This is automatically done by the view action distributor.
The action receiver also has to declare the dynamic cast declarations macros for its inherited view class, and for the MViewActionHandler and MActionTarget mixins.