Getting Started


VisualAge Composition Editor

The VisualAge Composition Editor, shown in Figure 8, is used to build VisualAge visual and non-visual parts. A visual part has a visual representation at runtime. It can include other visual parts, such as windows, labels, text parts (text entry fields), and push buttons.

Figure 8. Composition Editor on Smalltalk

Composition Editor

It can also include non-visual parts--parts that don't have visual representations at runtime. A set of VAGen non-visual parts are available to be used with the Composition Editor. As you build your user interface, the Composition Editor enables you to visually define connections that control how that interface communicates with other parts.

Figure 9. Composition Editor on Java

Composition Editor

The Composition Editor provides you with the following:

Tool bar
The horizontal row of icons that appear underneath the menu bar. The tool bar provides convenient access to common functions, such as aligning and sizing your visual parts.

Beans/Parts palette
The two vertical columns of icons that appear on the left side of the screen contain the parts you use to construct your graphical user interface. The left column is the set of part categories, and the right column is the set of parts within the selected part category.

Status area
The scrollable static text field at the bottom of the screen. This field displays information about your last definition operation or your current selection.

Free-form surface
The large open area in the middle of the screen where you place parts to visually define a GUI.

You can specify the user interface characteristics and logic flow visually by doing the following:

Refer to the online help for VisualAge for Java or the VisualAge for Smalltalk User's Guide for more information on designing visual parts.

For hands-on practice building visual parts, complete the steps outlined in Chapter 17, "Building a visual part using VisualAge for Java" or in Chapter 18, "Building a visual part using VisualAge Generator Developer on Smalltalk".

VAGen Script Wizard

The VAGen Script Wizard (shown in Figure 10) is an extension provided by VisualAge Generator to augment the capabilities of the Composition Editor. It enables you to quickly and easily compose simple scripts that get or set property values, or invoke methods in your parts. These scripts use the syntax of an object-oriented language (shipped as part of your development environment) without requiring you to master a new programming language. These scripts can be invoked from VAGen functions and give you access to non-VisualAge Generator parts, like graphical user interface objects or Enterprise JavaBeans (EJBs), during execution of your 4GL logic. Using the wizard can help reduce the number of static connections you make between objects on the free-form surface. It simplifies maintenance and can improve the performance of your visually composed clients.

Before you compose a script, lay out your parts visually and save the part or bean. To display the wizard, if you are using VisualAge Generator on Java, select the Members tab, followed by the Members menu, and then VAGen Script Wizard. If you are using VisualAge Generator on Smalltalk, select the Script Editor icon, followed by the VAGen Script Wizard icon.

Methods developed with the VAGen Script Wizard are called VAGen scripts or object scripts and are associated with the instance of the class (the GUI client) in which you develop them. You can access these scripts by including the reserved word EZESCRPT in a VAGen function and specifying the literal script name or a data item that contains the script name. Scripts invoked this way cannot require arguments. EZESCRPT cannot be used to pass arguments to your scripts, but you can share information between your GUI client and your 4GL parts by storing data in a record placed on the free-form surface of the GUI client where you are developing the script.

The VAGen Script Wizard steps you through the process of naming a script, declaring local variables, choosing patterns (including get properties/attributes, set properties/attributes, invoke method/send message, and perform action), and selecting objects to get data from and pass data to. For example, if a condition specified in your VAGen function is not met by input received from a GUI client, you can indicate which field is in error by using a VAGen Script to change the color of that field.

Figure 10. VAGen Script Wizard

VAGen Script Wizard with callouts

Areas

The VAGen Script Wizard has five areas on each window that provide you with information or allow you to enter data and make selections:

Action text
The action text is displayed at the top of each panel and directs you to make a selection or type text for the current step.

Assist mode text
The Assist mode text provides you with additional information about what to do in each step and, where appropriate, gives examples. When you start the VAGen Script Wizard, the Assist mode text is displayed. You can to turn it off and on by selecting the Assist Mode button.

Work area
The work area displays a set of fields where you specify logic and data to be used in your script. Depending on the step you are working on, different fields are displayed and the fields change as you develop your script. See the section on the panel you are working with for more specific information about this area.

Script area
The script area displays the current state of your script. This area is for display only, but if you know the syntax for the statement you want to add, you can select Free-form statement from the work area and type statements directly into an edit window.

You can also use the Back button to sequentially remove changes that you added, change a step, and then use the Next button to add your selections back in.

Status area
The status area located near the bottom of the window provides you with valuable information about your selections as you make them. For example, if the Next button is still not available after you make a selection, the status bar prompts you for another action.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]