A connection is directional; it has a source and a target. The
direction in which you draw the connection determines the source
and target. The part on which the connection begins is the source;
the part on which it ends is the target.
Often, it does not matter which part you choose as the source
or target, but there are connections where direction is
important.
- In an event connection, the event is always the source.
In the case of attribute-to-action connections, the
source event is signaled when the attribute changes
value.If you try to make an event the target, VisualAge
automatically reverses it for you.
- For attribute-to-attribute connections, if only one of
the attributes has a public set member function,
VisualAge makes that attribute the target. This is done
so that the attribute that has the public set member
function can be initialized at run time.
- When you make attribute-to-attribute connections, the
order in which you choose the source and target is
important. The source and target attribute values may be
different when the part is first initialized. If they
are, VisualAge resolves the difference by changing the
value of the target to match that of the source.
Thereafter, if both attributes have public set member
functions, the connection updates either attribute if the
other changes.
The target of a connection can have a return value. If it
does, you can treat the return value as a feature of the
connection and use it as the source of another connection. This
return value appears in the connection menu for the connection as
actionResult.
Connections
Changing the Source and
Target of Connections