User Reference

VisualAge connections and SilverMark's Connection Detangler

You use the VisualAge Composition Editor to create connections between parts. These connections define specific relationships between those parts. The four types of connections are:

Connection Type Description
Attribute-to-attribute An attribute of one part is always aligned with that of another part. This means that when the value of one part's attribute changes, the value of the attribute on the other end of the connection will automatically be changed to that same value. If the read-only-source value for the connection's settings is not checked, the relationship is bi-directional. For example, an attribute-to-attribute connection between the #object attribute of two Text parts guarantees that they will always show the same value. In this example, when the #object attribute of one text part changes, it effectively signals an #object event with the new value as a parameter. When read-only-source is set, only changes by the source part (the one from which the connection was originally dragged) have effect.
Event-to-script An event-to-script connection specifies that when the source event is signaled, a message is sent to the part in which the connection is defined. The script is in reality a method. In many but not all cases, the event will provide a parameter to the message, if the message's selector accepts a parameter.
Event-to-action An event-to-action connection specifies that when the source event is signaled, an action in the target part is executed. Actions are really abstractions for message selectors, so event-to-action connections are effectively event-to-script connections where the target method is not confined to the part in which the connection is defined.
Attribute-to-script Attribute-to-script connections are the most misunderstood types of connections. Perhaps this is because their name is a bit confusing. In the VisualAge 4.0 start connection popup, this is called Attribute-from-script, which is a bit more meaningful. This type of connection specifies that the source attribute should take on the value of the returned value of the target script under either of the following circumstances:
  1. When the part in which the connection is defined is initialized.
  2. When any additional dependent attributes have changed.

A dependent attribute may be any other part attribute. What this means is that when any dependent attribute changes, the script is executed and the value returned by it used to set the value of the connection's source attribute.All cleverness aside, it's generally best to only use these connections for initializing attributes (case #1) because the notion of dependents is not clearly presented by VisualAge and can just get you into trouble.

Parameter This type of connection is new for VisualAge V4.0. It specifies a connection from an attribute of some part to a parameter of a connection.

The thing to remember about VisualAge connection types is that they each specify that when something changes (the trigger), something should be done about it (the action). One could say that for any given connection, when its trigger occurs, the connection fires, causing it to perform some action. Parameter connections are a little different because they are triggered to fire to retrieve their source parameter value when their target connection fires.

The Connection Detangler hooks on to connections so that it detects when connections fire. When a connection fires, the Connection Detangler stores information about this as a connection notification. The Connection Detangler does not display connections. It displays connection notifications. This is an important distinction. It means that the Connection Detangler displays information about the dynamic runtime behavior of connections, rather than the static description, which the Composition Editor displays. Being able to view the dynamic runtime behavior of connections is key to being able to have a useful understanding of them.

Starting the Connection Detangler

To start the Connection Detangler, select Connection Detangler... from the VisualAge Organizer Options menu. The first time you do this, you are presented with a product registration dialog.

You can either press Evaluate for 30 days to start the product evaluation period, or follow the directions to purchase the product. This is the only time you are bothered with this inconvenience.

The Connection Detangler Main Interface

Overview

The interface has been kept as simple and straightforward as possible with one main view and a minimal set of secondary dialogs.

The Connection Detangler main view is divided into an upper and lower region. The upper region, called the Part Interaction Diagram, graphically shows part interactions in terms of interacting parts and a list of arrows that represent connection notifications. The lower region, called the Notification Details List, is an alternate detailed textual list of those notifications. The two lists are synchronized so that they always represent the same notifications in the same order. Whenever an item is selected in one list, the corresponding item in the other list is also selected.

The upper and lower regions are separated by a movable separator widget that enables you to adjust the relative sizes of each of the regions. To adjust the sizes, place your mouse cursor over the thin area that separates the two regions. Thc cursor should change to a double arrow. Now you can just drag the separator vertically to its new position.

The Part Interaction Diagram is itself divided into an upper and lower region. The upper region called Collaborating Parts shows icons for interacting parts joined by lines called Collaborating Part Hierarchy Lines, configured in such a way as to indicate their containment hierarchy (parenting). Think of a container tree view turned on its side. The lower region called the Notifications List displays notifications as arrows between the vertical lines that descend from part icons. The Collaborating Parts and Notifications List regions are separated by a movable separator widget, as well. Other miscellaneous regions on the Detangler view are the menu bar and the Control Bar. The menu bar is the standard window menu bar. It contains File and Options menus. The Control Bar contains buttons that control the operation of the Connection Detangler.

Part Interaction Diagram

Collaborating Parts

The Collaborating Parts region of the Part Interaction Diagram region of the Connection Detangler displays icons for those parts that are either sources or targets of connection notifications. This area also shows icons for any parents of collaborating parts, regardless of whether they are sources or targets of connection notifications.

Collaborating Part Hierarchy Lines

The lines above the collaborating part icons show the containment hierarchy of the parts. In the above example, the left-most part is the top-level parent of all the parts to the right of it. The window is the parent of the notebook, the notebook is the parent of the notebook page, the notebook page is the parent of the scrolled window and so on....

Viewing part names

Hover-help is used to show the names of collaborating parts. You can view the names by passing the mouse pointer over their icons. If you do this but do not see hover help, open the VisualAge Preferences notebook (press on the VisualAge Organizer toolbar) and check Show hover help on the General page.

When you view part names, you will see a number in parenthesis appended to the beginning of each name. For example: (1)Query Results. As collaborating parts make their presence known, they are assigned an instance number. This number is used to indicate the instance of the part name. This serves to distinguish parts with the same name or multiple instances of the same part.

If you have any connections to other connections (for example, a connection to a parameter or result of a connection) you will see those connections appear as collaborating parts. The name displayed for a connection is the same name you would see for it in the Composition Editor status area when it is selected in the Composition Editor, with the above instance number concatenated.

Collaborating part popup menu operations

You can perform one of the following operations when you raise a popup menu over a collaborating part's icon:

Menu item label Description
Inspect part Open a Smalltalk inspector on the part.
Edit part Open a VisualAge editor on the part's class
Browse part Open a Smalltalk class Browser on the part's class
Select part in editor This searches the parent tree for the parent part that uses the selected part, and opens a VisualAge Composition Editor on that parent part. This is a very powerful feature that enables you to rapidly locate where a part is used.

For example, consider the case of a visual part, MyVisualPart, whose primary part is a window and that window contains a form with a notebook, and that notebook contains several pages, each of which holds a reusable visual part - one of which contains a group box that contains a particular text part. If you were to approach this view or one like it, without any familiarity with the way it was constructed, you might spend a fair amount of time browsing classes and opening editors until you found the reusable view in which the particular text part was used. With the Connection Detangler, all you need to do is run the application, popup over the text part and press the Select part in editor item to open a Composition Editor for the reusable view that contains the text part. This saves you time you would normally spend wandering through browsers and inserting halts.

You can also see the hierarchy of parts directly on the Collaborating Parts region of the Connection Detangler.

Only show connections for this part Only show connections to or from the selected part, that is, filter connections by the selected part.
Show connections for all parts Show connections for all parts, that is, do not filter connections by part.

 

Notification List

The Notification list is the part of the Part Interaction Diagram that lists connection notifications. It also provides a mechanism for navigating to connection definitions within the Composition Editor.

The notification list is a list whose items each represent a unique connection notification. Remember that a connection notification is not the same as a connection. A connection notification is a particular instance of a connection's firing. Each item is represented by an arrow drawn in the color that the connection it represents would normally appear in the Composition Editor as.

For each arrow,. the end with the rectangle resides at the source of the connection and the end with the point resides at the target of the connection. The text shows the connected feature names. Display of the text can be turned off or on with the Show feature names in diagram menu item under Options.

The vertical lines direct you icons for their respective collaborating parts.

Notification List Popup Menu Operations

You can raise a popup menu after selecting an item in the Notification List. The menu items are:

Menu item label Description
Select connection in editor This locates the part in which the connection is defined, opens a Composition Editor on that part and selects the connection. This a powerful feature for understanding unfamiliar applications. You can use this to instantly navigate to a connection, saving you time.you would normally spend not only hunting for the right part class but also the right connection within the Composition Editor for that class.
Add break on connection Set a break point on the selected connection. The next time the connection fires, the Connection Detangler will suspend the process that the connection is running in. While the process is suspended, you can open a VisualAge debugger to step through the Smalltalk code for the connection, or simply resume execution.
Remove break on connection Remove a break point on the selected connection, if there is one defined.
Inspect connection You can use this to inspect the connection represented by the notification. Connections are defined by the following classes:
Connection type Connection class
Attribute-to-attribute AbtAttributeToAttributeConnection
Attribute-to-script AbtAttributeToCodeHookConnection
Event-to-action AbtEventToActionConnection
Event-to-script AbtEventToCodeHookConnection

Notification Details List

The Notification Details list shows details about each connection notification. Like the Notifications List, each item represents a unique connection notification. When you select an item in this list, a corresponding item is selected in the Notifications List.

The columns in the list are, in order:

Column name Column Description
Num A number assigned to connections. Each connection is assigned a number the first time a notification for it (the first time it fires) is detected. Whenever a notification for a connection is added to the Notification Details List, it is given the same number as the first time it was added..
Ref The reference number for a particular connection. This number indicates the number of times the same connection has appeared in the Notification Details List. In the above example list, connection number 1 appears two times. The first occurrence is given a reference of 1, and the second has a reference of 2.
Type The first column labeled Type refers to the source feature type. Its values can be Attribute or Event.
Source The source part in the connection notification.
Source Feature The name of the connection's source feature.
Type The second column labeled Type refers to the target feature type. Its values can be Attribute, Event, or Script.
Target The target part in the connection notification.
Target Feature The name of the connection's target feature.
Parameters The parameter or parameters passed by the connection to the target. For example, attribute-to-attribute connections pass the changed attribute as a parameter.
Activity This is the activity that the connection is engaged in when it fires. Values are:
Value Description
alignSourceWithTarget The act of setting the value of the source feature to the value of the target feature, in an attribute-to-attribute connection.
alignTargetWithSource The act of setting the value of the target feature to the value of the source feature, in an attribute-to-attribute connection.
setAttributeValueFromCodeHook The act of setting the value of an attribute to the value returned by a script (code hook) in an attribute-to-script connection.
send The act of performing a message send as a result of an event in either an event-to-script or event-to-action connection.

Notification Details List Popup Menu Operations

You can raise a popup menu after selecting an item in the Notification Details List. The menu items are:

Menu item label Description
Select connection in editor This locates the part in which the connection is defined, opens a Composition Editor on that part and selects the connection. This a powerful feature for understanding unfamiliar applications. You can use this to instantly navigate to a connection, saving you time.you would normally spend not only hunting for the right part class but also the right connection within the Composition Editor for that class.
Add break on connection Set a break point on the selected connection. The next time the connection fires, the Connection Detangler will suspend the process that the connection is running in. While the process is suspended, you can open a VisualAge debugger to step through the Smalltalk code for the connection, or simply resume execution.
Remove break on connection Remove a break point on the selected connection, if there is one defined.
Inspect connection You can use this to inspect the connection represented by the notification. Connections are defined by the following classes:
Connection type Connection class
Attribute-to-attribute AbtAttributeToAttributeConnection
Attribute-to-script AbtAttributeToCodeHookConnection
Event-to-action AbtEventToActionConnection
Event-to-script AbtEventToCodeHookConnection

Menu Bar

File

Menu item label Description
New Create a new workspace.
Open... Open a workspace specified by a file selection prompter.
Print... Not active for Version 1.0 of the Connection Detangler.
Print setup Not active for Version 1.0 of the Connection Detangler.
Report Open a workspace with a textual representation of the collaborating parts and connection notifications.
Save image Save the image.
Save image as... Save the image specifying a name for it with a file selection prompter.
Exit VisualAge Exit the VisualAge image.

Options

Menu item label Description
Show feature names in diagram This toggles whether feature name text is shown in the Notifications List
Preferences Open the VisualAge Preferences notebook page for the Connection Detangler.
Break on all connections This toggles whether to automatically break on any and all connection notifications.

Warning:
Breaking on all connections can cause the image to hang if hover help is raised by the VisualAge Organizer or any other part that connects to hover help notification. This happens when the hover help process is suspended as a result of notification of hover help being raised.

Select break connections... This opens the Select Break Connections dialog so you can add or remove connections from the list of those to pause on.
Filter Connections by Part This opens a dialog that lists the hierarchy of interacting parts. You select the parts you want to view connections to or from. Connections from or to any other parts are not shown.
Purchase Connection Detangler... This opens the Connection Detangler registration view. This view displays a product serial number that you can use to register the product to the current Envy user. Once acquire a key for that serial number from SilverMark and enter it into the registration view, your copy of the Connection Detangler is permanently registered to that Envy user.

Control Bar

The control bar provides easy access to often used controls or settings.

The control bar widgets from left to right are:

Button label Description

Start/Stop

Green Traffic Light.gif (191 bytes)/Red Traffic Light.gif (190 bytes)

Start or stop watching connections. The label for this button is either Start watching connections or Stop watching connections. When it is Stop watching connections, pressing it stops connection watching and causes the label to change to Start watching connections. When the label is Start watching connections, pressing it starts connection watching and causes the label to change to Stop watching connections.

Update

Update Detangler.gif (180 bytes)

This updates the lists with any pending connection notifications. You may have connection notifications pending under the following circumstances:
  • Auto Update is not checked
  • Auto Update is checked and the update value is greater than zero

Pending connection notifications are indicated in the Connection Detangler title bar. the Update pending connections button is enabled when the number of pending connection notifications is greater than zero.

Clear

Clear Detangler.gif (176 bytes)

This clears all lists and any pending connection notifications. This Clear connections button is enabled when when the number of pending or displayed connection notifications is greater than zero.

Debug

debug.gif (162 bytes)

The Debug current connection button is enabled when the Connection Detangler has paused on a connection due to a break on that connection. You can use Debug button to open the VisualAge debugger at a point close to where the connection performs its action.

Resume

resume.gif (150 bytes)

The Resume execution button is enabled when the Connection Detangler has paused on a connection due to a break on that connection. You can use Resume execution button to resume execution of the application.
Auto Update When Auto Update is checked, newly detected connection notifications are added to the lists based on the auto update spin button value. This value specifies how many connection notifications to buffer before actually updating the lists. For a value of 0, update is immediate. For a value of 5, the lists would be updated every fifth time a connection notifications is detected.

When Auto Update is not checked, any new connection notifications detected are buffered until the Update button is pressed or Auto Update is checked.

The whole reason for being able to specify whether or not to automatically update the display of connection notifications and to buffer them is to prevent the Connection Detangler from injecting a performance burden in the form of its own list update operations into your application.Clearly, leaving Auto Update not checked will have the least burden because no updates to the lists occur unless you specifically request so. Typically selecting Auto Update with a value of 5 works well because you can see connection notifications being updated but, unless you have a large amount of connection notification traffic, the performance penalty will be minimal.

 

Filtering connections by part

You can elect to show only those connection notifications that are related to a particular part or parts. This is useful when there are many connection notification shown and you want to focus on those related to a particular set of collaborating parts.

There are two ways to filter connections:

Filter connections from popup

When you pop up over a part and select the Only show connections for this part item of the popup menu, the items in the lists are reduced to those that either originate from or terminate in the part. To show all connections again, simply pop up over any part and select the Show connections for all parts item.

Note: If there are no connections related to the part, no items or parts will be shown. In this scenario, there are no longer any parts to pop up over so you will need to use the second method below to expose the collaborating parts.

Filter connections from dialog

You can select a set of parts that you want to see connection notifications for. To do this, select the Filter connections by part item of the Options menu. When you do this, you are presented with the following dialog:

The dialog shows the hierarchy of collaborating parts. Any parts that have previously been selected are selected for you. The default is for all items to be selected. When you have selected the parts you are interested in viewing connections for, press OK to have the Detangler view updated to reflect the change.

Note: If you press OK with no items selected, it assumes all items are to be selected. This is to prevent you from creating a view on the connections with a filter containing no parts.

Secondary Views

Connection Detangler Preferences

The Connection Detangler preferences are integrated with the VisualAge Preferences notebook on a tab called Detangler. You can access this page in either of three ways:

The items on the page indicate Detangler startup options. These values are only used when an instance of the Connection Detangler starts up. Once it has started and set it values based on the preferences, it ignores any changes to them. The values you can set are:

Preferences setting Description
Start watching when opened When this is checked, the Connection Detangler starts watching for new connection notifications immediately upon being opened. When it is not checked, you must manually press the Start button in the control bar to begin connection notification watching.
Automatically update diagram This specifies the initial setting of the Auto Update control bar item.
Buffered connections This specifies the number of connection notifications to buffer. This value is used to set the initial value of the Auto Update spin button on the control bar.
Filter out VA noise When this is checked, connection notifications for a small set of VisualAge operations are filtered out. For example, connection notifications detected as a result of selecting the Test button from the VisualAge Organizer or Composition Editor are not logged. Only a few VisualAge-originated connection notifications are filtered out because it is time consuming to match each and every connection notification against the sum total of all possible VisualAge-originated connection notifications. Still, this serves the purpose of eliminating the top few 'offenders'.

Setting and removing break connections

You can set and remove connection breakpoints by using the Select Break Connections dialog. You open this by selecting the Select break connections... item of the Connection Detangler Options menu.

Setting break connections

To set one or more break connections:

  1. Open the Select Break Connections dialog by selecting the Select break connections... item of the Connection Detangler Options menu.
  2. Select a part in the left most list (Parts).
  3. Select one or more connections in the middle list (Connections).
  4. Press the >> button. This moves those connections from Connections list to the right list (Break Connections).
  5. Repeat steps 1 through three until you have selected all the connections you wish to break on.
  6. Press OK.

or

  1. Select a connection notification from either the Notification list or the Notification Details list of the main Connection Detangler view.

  2. Popup over the item and select the Add break on connection menu item,

When a break for a connection is set, any notifications for that connection are displayed using dashed lines:

scdbconn.gif (20344 bytes)

As you can see above, the Display, #object--->Timer,#secondsRemaining connection has a breakpoint set.

Removing break connections

To remove one or more break connections:

  1. Open the Select Break Connections dialog by selecting the Select break connections... item of the Connection Detangler Options menu.
  2. Select one or more parts in the right list (Break Connections).
  3. Press the << button.
  4. Press OK.

or

  1. Select a connection notification from either the Connection Notification List or the Connection Notification Details list of the main Connection Detangler view.

  2. Popup over the item and select the Remove break on connection menu item.

Using Break Connections

When one or more break connections are set, the next time a notification for any of them is detected, the Connection Detangler does the following:

At this point you can open the VisualAge debugger on the connection code and trace through its operation through the point at which it enters the target part, or simply press Resume to continue execution.

While a connection notification is paused, you may want to check the Break on all connections toggle and then press Resume. This allows you to single-step through each connection notification. Uncheck the Break on all connections toggle to exit this mode.

Registering your copy of the Connection Detangler

When you load the Connection Detangler feature into your image, or the first time the Connection Detangler starts watching connections, you are presented with a product registration screen:

You can either start the product evaluation period, purchase the product. Evaluation or registration copies are always in terms of the current Envy user (unique name). This is the license holder.

If you decide to simply evaluate the product, you can elect purchase it at a later time. Each time you start the Connection Detangler during the evaluation period, you will be reminded of the time remaining in the evaluation with the following Transcript message:

You have 16 days remaining on your Connection Detangler evaluation.
Please contact SilverMark, inc. at info@silvermark.com or www.silvermark.com or (888) 588-0668 or (919) 870-7994 if you would like register your copy.

Once your 30 day evaluation evaluation period has expired, trying to start the Connection Detangler will result in the above registration dialog being shown. Your only choice at that time is to register the license or uninstall the product.

To register your license at any other time, select the Purchase Connection Detangler... Options menu item of the Connection Detangler. You will be shown the above product registration dialog.

Note: Product registration and evaluation is always in terms of a license holder. That license holder is the current Envy user (EmUser current uniqueName).

 

Purchasing the product:

Read and understand the purchase license agreement. This is available electronically or in printed form if you purchased diskettes.

  1. If you purchased the product on diskette you must enter the printed serial number that came with the diskette in the field marked Serial number below. Note: This is in place of the one already shown.
  2. If you downloaded the program you should leave the serial number shown as it is.
  3. Located or obtain a key, and enter it in the field marked Key
  4. Press Register or evaluate the product to complete your registration.

 

Evaluating the product:

To begin the 30-day evaluation period for the Connection Detangler:

  1. Read and understand the evaluation license agreement.
  2. Press Register or evaluate the product with the Key field blank.

 


Back to table of contents


Copyright 1997 SilverMark, Inc.
919-858-8300