MSM-Workstation
Create the First Set of Windows

Go back to the previous page in this sequence
Go back to the start of this chapter
Go back to the first page of this tutorial

Initialization

Now it is time to start working on the processing that the window is going to do, partly visible to the end-user, and partly behind the screens.

First, any initialization will need to be specified. For the window as a whole, it is already established that the button at the bottom is initially inactive, and the Text Box and Drop Down Box initially have no visible value.

For this example, a database is created containing fictional names that are derived from a work of literature that is old enough that no copyright issues exist about usage of these names. The work chosen for this purpose is Macbeth by William Shakespeare.

In the initialization code for the window, a check will be made whether the database exists, and if this is not the case, the initial information will be re-established.

In the context of MSM-Workstation, there are three possible locations where this initialization code may be stored:

For the purpose of providing an example, a separate routine will be established that re-initializes the database, a couple of subroutines will be established as "common code", and some code will be embedded.

In order to add or edit the M[UMPS] code that provides this check and possible re-initialization, right click on the edit window on a location that is not used for any component. This will bring up the sub-menu, allowing the end-user to modify properties of the window. From this menu, select "Actions".

In this case, an application specific routine is invoked. The code in this routine can be read by clicking here.

(Click here to cut and paste this code.)

In MSM-Workstation, Version 2.0, this is sufficient.
In MSM-Workstation, Version 1.0, an additional action is needed.

In MSM-Workstation, Version 1.0, this initialization code (create event for window) is defined by selecting the create event in the upper List Box, entering the code (preceded by a "tab" character in the lower document box, and then clicking once on the save button.

Pressing the Save button causes the code to be saved and causes the line in the upper list box containing the information about the Create event to be updated.

The number following "Create" represents the number of lines of code; the rest of the line are the first characters of the first line of code.

In MSM-Workstation, Version 2.0, this "save" action happens implicitly when the focus changes out of the code edit window.

In MSM-Workstation, Version 1.0, the code edit window will maintain focus. In order to return to the main edit window, the close button (also known as go-away button) in the right upper corner of the "Actions" window has to be pressed.

Go on to the next page in this sequence.