VBConnection Statement

The VBConnection statement describes a connection within a visual or nonvisual part.

{ //VBConnection: typeTag, connNumber, sourceType, targetType, source?, typeParameters }

If the typeTag value is AA, typeParameters consists of the following parameters: { sourceAttribute, target?, targetAttribute }

If the typeTag value is EA, typeParameters consists of the following parameters: { sourceEvent, target?, targetAction }

If the typeTag value is EC, typeParameters consists of the following parameters: { sourceEvent, target?, targetFeature }, description?, returnTypecode

If the typeTag value is EM, typeParameters consists of the following parameters: { sourceEvent, target, targetMethod }

typeTag
{ ( AA | EA | EC | EM ) }

AA
Attribute-to-attribute connection. The source attribute must have an associated notification ID.

EA
One of the following:
  • Event-to-attribute connection.
  • Event-to-action connection.
  • Attribute-to-action connection. The source attribute must have an associated notification ID.

EC
Event-to-custom logic connection.

EM
Event-to-member function connection.

connNumber
The connection number.

sourceType
{ ( p | c ) }

p
The connection source is a part.

c
The connection source is a connection.

targetType
{ ( p | c ) }

p
The connection target is a part.

c
The connection target is a connection.

source
The name of the source part or number of the source connection for this connection. If the source is a part and a source name is not specified, the part being described is the source.

sourceAttribute
The name of the source attribute for this connection.

sourceEvent
The name of the source event for this connection. This can be either an event feature or an attribute that has a notification ID.

target
The name of the target part or number of the target connection for this connection. If the target is a part and a target name is not specified, the part being described is the target.

targetAttribute
The name of the target attribute for this connection.

targetAction
The name of the target feature for this connection. This can be either an action or an attribute that has a set member function.

targetFeature
For an event-to-custom logic connection, customLogic.

targetMethod
The signature of a member function of the part being described.

description
A C++ string that describes the custom logic. If no description is needed, specify a null string ("").

returnType
The C++ return type from the custom logic.

code
C++ code for the custom logic. The code can be enclosed in parentheses. If the code spans multiple lines, each additional line must be specified in a VB continuation statement for the VBConnection statement.


Related procedures
Defining the Part Interface Using Part Information Statements

Related references
Visual Part Information Statements
Nonvisual Part Information Statements
Part Information Statement Descriptions
Part Information Statement Examples