AppBuilder Custom Lists
Beta Draft
Author: (Author's Name)
Date Last Updated: (Date)
Scheduled Release: (Release Number)
Revision History
The following revisions have been made to this document:
Date: (date)
Revision: (rev-no)
Developer: (developer)
Summary of Changes: (summary)
Copyright (C) 2000 by Progress Software Corporation ("PSC"), 14 Oak Park, Bedford, MA 01730, and other contributors as listed below. All Rights Reserved.
The Initial Developer of the Original Code is PSC. The Original Code is Progress IDE code released to open source December 1, 2000.
The contents of this file are subject to the Possenet Public License Version 1.0 (the "License"); you may not use this file except in compliance with the License. A copy of the License is available as of the date of this notice at:
http://www.possenet.org/license.html
Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. You should refer to the License for the specific language governing rights and limitations under the License.
Contributors
Jane Contributor, Joe Contributor
Contents
The AppBuilder Custom Lists allow the user to define up to six pre-processor directives, each of which specifies a list of controls. To include a control in a list, the user can activate a toggle box in the Advanced Properties dialog associated with one of the defined pre-processor directives that specifies a list. Thus, by activating or clearing these toggle boxes, the user can include or exclude the control in one or more of the lists. These lists can then be used at run time by the user’s program to interact with the specified groups of controls, for example, to enable or disable a particular group of controls at one time.
This document describes how the six custom lists are named and built, and how the data is then written to the 4GL program that the AppBuilder writes.
At the time that an AppBuilder file is saved, the Custom Lists are written into the AppBuilder source code file. When the file is read back into the AppBuilder, the pre-processor section is parsed for the names of the pre-processor directives. The run-time attributes section is parsed for the controls that have their list flags switched on.
The following code snippets are extracts from an AppBuilder generated file containing custom lists. The pre-processor block and the run-time attributes settings do not follow each other in a standard program, but are shown below each other to illustrate their relationship.
The sections in bold italics in the following code snippets include the code that is parsed to produce the custom lists.
&ANALYZE-SUSPEND _UIB-PREPROCESSOR-BLOCK
/* ******************** Preprocessor Definitions ******************** */
&Scoped-define PROCEDURE-TYPE Window
&Scoped-define DB-AWARE no
/* Name of first Frame and/or Browse and/or first Query */
&Scoped-define FRAME-NAME DEFAULT-FRAME
/* Standard List Definitions */
&Scoped-Define ENABLED-OBJECTS FILL-IN-1 TOGGLE-1 COMBO-BOX-1
&Scoped-Define DISPLAYED-OBJECTS FILL-IN-1 TOGGLE-1 COMBO-BOX-1
/* Custom List Definitions
/* Test,List-2,List-3,List-4,List-5,List-6 */
&Scoped-define Test FILL-IN-1 COMBO-BOX-1
&Scoped-define List-2 TOGGLE-1 COMBO-BOX-1
/* _UIB-PREPROCESSOR-BLOCK-END */
&ANALYZE-RESUME
The settings in the above code snippet result in a custom attributes dialog that is set as above.
The settings in the following code snippet result in an Advanced Properties dialog on COMBO-BOX-1 as follows:
/* *********** Runtime Attributes and AppBuilder Settings *********** */
&ANALYZE-SUSPEND _RUN-TIME-ATTRIBUTES
/* SETTINGS FOR WINDOW C-Win
VISIBLE,,RUN-PERSISTENT */
/* SETTINGS FOR FRAME DEFAULT-FRAME
*/
/* SETTINGS FOR COMBO-BOX COMBO-BOX-1 IN FRAME DEFAULT-FRAME
1 2
*/
/* SETTINGS FOR FILL-IN FILL-IN-1 IN FRAME DEFAULT-FRAME
1 */
/* SETTINGS FOR TOGGLE-BOX TOGGLE-1 IN FRAME DEFAULT-FRAME
2 */
Note the check marks in both of the first two custom lists.
When the AppBuilder source file is later saved, the AppBuilder writes out all the appropriate information shown in the above code snippets along with preprocessor directives for any of the custom lists that have controls included in them.
This component of the AppBuilder relies on two items of data contained in three of the AppBuilder temp-tables.
In the _P record for each procedure the _LISTS field contains a comma-separated list of the names of the lists.
In the _U record for each control contained in the procedure the _USER-LIST array of logical fields contains the settings that indicated which lists the control should be added to. The extent of the _USER-LIST array is determined by the global directive, &MaxUserLists, which is defined at the top of the include file “adeuib/uniwidg.i.”
In the _BC temp-table defined in “adeuib/brwscols.i” the _USER-LIST array is defined to make sure that the list is available for each column of a browse.
4 Primary Algorithms and Processes
When an AppBuilder source file is read into the AppBuilder, or a new procedure is created in the AppBuilder, the AppBuilder automatically creates a new _P record for that procedure file. The _P record stores all the procedure settings and groups the related controls that are stored in the _U table.
As a procedure is read into the AppBuilder (via “adeuib/_qssuckr.p”), the code is parsed for each section that it contains. In the internal procedure “analyze-suspend-reader” (about 1160 lines into “adeuib/_qssucker.p”) there is a section that is responsible for parsing the custom list names from the file. It is expected that the custom list names be defined in two lines as follows:
/* Custom List Definitions
/* Test,List-2,List-3,List-4,List-5,List-6 */
The first line is a marker to the parser. The second line is stripped of comments and stored directly into the _LISTS field on the _P record for the file.
Note that the following lines that contain the preprocessor definitions for the lists are ignored.
4.2 Reading in the list membership
After each control has been read in and _U records have been created for them in the AppBuilder, “adeuib/_qssuckr.p” runs the “read_run_time_attributes” internal procedure to read in all the run-time attributes for each control. Around line 1925 of “adeuib/_qssuckr.p” the procedure iterates through the list of settings in the string and checks for integer values. The integer values are used as a subscript to the _USER-LIST array of the _U record and each array item is set on.
Changing the list item names is achieved in the Custom Lists dialog (“adeuib/_ppvars.w”). This procedure takes the _LISTS record from _P as an input-output parameter, allows the user to edit it and returns the edited values.
4.4 Changing the list membership
When the user chooses to edit the advanced properties of a control, the “adeuib/_advprop.w” procedure runs. This procedure accepts the RECID of the appropriate _U record as an input parameter and allows the user to edit the record, including the _USER-LIST flags.
4.5 Writing out the list names
During the process of writing out the source code file, the “put_win_preproc_vars” internal procedure in “adeuib/_genproc.i” builds up the preprocessor lines for the custom lists, writes out the list names, and writes out preprocessor lines that contain any items. Note that the preprocessor lines are only written out for compilation — they are not written to be parsed back in.
4.6 Writing out the list membership
When the run time attributes for the controls are written out, the AppBuilder also writes out the subscripts of any of the _USER-LIST array elements that are set on. The file “adeuib/_genrt.i” is responsible for ensuring that this data is properly written out.
N/A
N/A
This tool uses the following source files:
Source File |
Description |
adeuib/_advprop.w |
Advanced Properties dialog |
adeuib/_attr-ed.w |
Properties Window allows editing of list membership |
adeuib/_genproc.i |
Internal procedures included into adeshar/_gen4gl.p and adeshar/_gendefs.p |
adeuib/_genrt.i |
Included into adeshar/_gen4gl.p to generate the runtime attributes section of an AppBuilder source file |
adeuib/_ppvars.w |
Startup procedure of the AppBuilder |
adeuib/_qssuckr.p |
Reads a source code file into the AppBuilder |
adeuib/_uibinfo.p |
Returns the values of the lists from “contains-info” internal procedure |
adeuib/brwscols.i |
Temp-table definitions for _BC temp-table |
adeuib/uniwidg.i |
AppBuilder Temp-Table definitions including _U and _P |
adeuib/usrlistl.i |
Changes the labels for the Custom Lists |
8. Build Process and Requirements
N/A
N/A
10. Requirements and Strategies
N/A
N/A
The following documents provide additional information about the tool: