Totally Objects - Text Widget Hyperlink (Version 6.0 [1.0.0])


This Totally Objects product for IBM's VisualAge for Smalltalk contains an example of how to adapt a standard VA text widget to act as a hyperlink..


This product has been packaged as a single application. To import it into your library select 'Browse Application Editions' from the 'Tools' menu of the 'System Transcript'. In the 'Application Editions Browser' select 'Import...' from the 'Names' menu and select the file hyperlink6.*.dat. You should then select the single application contained within this file:

To load the configuration maps into your image select each of them in the 'Application Editions Browser' select 'Load' from the 'Editions' menu.


The Test Window

Open up the TobHyperlinkTestWindow part. There is a window with a text widget placed on the canvas. There are two connections, one of which is attached to the ConfiguredWidget action and the other is connected to the destroyedPart action.

The configuredWidget method sets up an event for the click and configures a cursor for the new hyperlink..

There is also a method that implements the link action.

Defining the required link

The following is the code provided in the event handler:

shellExecute: nil
lpFile: ''
lpParameters: nil
lpDirectory: nil
nShowCmd: 0

Needless to say, you should replace '' with the URL that you require. 

Further Information