GUI ScreenIO for Windows

 ScreenIO.com


Sample Application

Here's a schematic representation of the sample application.  It consists of a Main and a Base panel (always working-set 1), plus popups in working-sets 2, 3, and 4. 

Popups SET2, SET3, and SET4 are the first panels displayed in their working-set.  Popups SET2A, SET2B, SET3A, SET3B, SET4A, and SET4B are displayed following the first popups in their respective working-sets, and will disable the previously displayed panel(s) in their set when they are displayed.

You may switch freely between the panels in different working-sets except when panel SETX is active.

Popup SETX may be displayed from any working-set.  It is modal; it will disable all of the other panels in the application until you are finished with it, which will prevent you from displaying it from more than one set at the same time (which would cause problems, because you can't have two copies of the same panel/program active at once).

Programming Overview

The multiple working-set application is organized as we recommend; one program per panel.  In the case of a multiple working-set application, this makes things far easier to manage, and much simpler.

Main program and working-set flow control

SETDEMO.COB is the main program; it displays the container and handles the high-level flow control, which is trivial. It simply routes control to the subroutine that handles the currently active working-set, and closes the application when the 88-level item END-OF-JOB is TRUE.

Base panels: working-set 1

Program SET1.COB, which is working-set 1 (the default) handles a base panel which has buttons and a menu that let you open the other working-sets.

Note:  Base panels may only be assigned to working-set 1, and may not be assigned to any other working-set.

Other working-sets and panel-level flow-control

The programs for working-sets 2, 3, and 4 are identical except for the names of panels and the subroutines they call, so you can see how general the logic is.  When they receive a panel-EVENT-INACTIVATED, these programs return the name and working-set of the panel becoming active to the main program in WORKING-SET-DATA. 

The main program examines ACTIVE-SET to determine which subroutine is to be called to activate the desired working-set, and that subroutine examines ACTIVE-PANEL to determine which panel-management subroutine must be called to activate the correct panel. 

A panel becomes active when it is displayed or updated by a call to GUI ScreenIO.

SETX: a modal panel

The program SETX.COB may be called from anywhere in the application; this is possible because it displays the modal panel PSETX, which disables all of the other windows in the application.

Therefore, because it's not possible for the user to switch to another working-set where they could launch another copy of SETX, this prevents the user from launching more than one copy of SETX.


© 2000-2019 Norcom, all rights reserved 

TOC

Send feedback to Norcom