skip to main content
OpenEdge Development: AppBuilder
Customizing AppBuilder : AppBuilder's API
 
AppBuilder's API
Once AppBuilder runs an XFTR event handler, the event handler can access AppBuilder’s API. This allows the XFTR event handlers to interact with AppBuilder to provide customized processing that is coordinated with AppBuilder’s standard processing.
Context IDs
AppBuilder’s API allows XFTR event handlers to gather information about all of the widgets, procedure files, SmartObject instances, and user‑editable code sections in AppBuilder. Each of these different objects is stored in a separate record in AppBuilder’s internal temporary tables. The context ID provides a unique reference for each type of object.
Although AppBuilder’s API allows you to reference some objects by name or by handle, you should use the context ID to reference objects. Context IDs have the following advantages:
*They are guaranteed to be unique for each AppBuilder session
*They generally provide faster access to the available objects
Naming convention
All of the parameter names used in AppBuilder’s API begin with the letter p (for parameter), which is followed by a second letter that specifies the data type, as indicated in Table 20.
 
Table 20: Naming conventions 
Character
Data type
c
Character
d
Decimal
h
Handle
i
Integer
l
Logical
AppBuilder’s API summary
Table 21 summarizes the various procedures that comprise AppBuilder’s API. These procedures are stored in the adeuib.pl procedure library. Each of these procedures is described in detail later in this appendix.
 
Table 21: API procedures 
API procedure
Purpose
adeuib/_ablink.p
Add and remove SmartLinks at design time in AppBuilder.
adeuib/_accsect.p
Create, delete, read, and write code sections in AppBuilder.
adeuib/_dbtbnam.p 
Use AppBuilder to correctly generate table names based on the setting of the Qualify Database Fields with Database Names user preference.
adeuib/_uibinfo.p 
Get information about the widgets, SmartObject instances, and the procedure itself, in a design window.
adeuib/_uib_crt.p
Create objects in AppBuilder.
adeuib/_uib_del.p
Delete objects in AppBuilder.
adeuib/_uib_dlg.p
Call a subset of the AppBuilder’s dialog boxes.
adeuib/_winsave.p
Mark a procedure file as modified.
adeuib/_namespc.p 
Register names of variables or procedures that cannot be used by AppBuilder users.
Add/remove SmartLinks (adeuib/_ablink.p)
Use the adeuib/_ablink.p procedure to add/remove a SmartLink joining two SmartObjects, as shown:
 
Calling sequence
RUN adeuib/_ablink.p.p
  ( INPUT pc_operation,
    INPUT pi_sourcecontext,
    INPUT pc_linkname,
    INPUT pi_targetcontext ).
Input parameters
The adeuib/_accsect.p procedure takes the following input parameters:
pc_operation
A quoted character string that specifies the operation to be performed. For example:
*“ADD” — Adds the link identified by the pc_linkname parameter
*“REMOVE” — Removes the link identified by the pc_linkname parameter
pc_sourcecontext
The context ID for the object at the originating (source) end of the link.
If the operation is “REMOVE”, you can use the question mark (?) character to refer to THIS-PROCEDURE.
If the operation is “REMOVE” and the target context argument represents a single destination object, you can use:
*The context ID for a single source object
*A comma‑separated list of context IDs, representing multiple source objects
*The star (*) character, representing all source objects
pc_linkname
A quoted character string identifying the type of link to be added (ADD) or removed (REMOVE). For example “FILTER”.
pc_targetcontext
The context ID for the object at the destination (target) end of the link.
If the operation is “REMOVE”, use the question mark (?) to refer to THIS-PROCEDURE.
If the operation is “REMOVE” and the source context argument is a single object, use:
*The context ID for a single destination object
*A comma‑separated list of context IDs, representing multiple destination objects
*The star (*) character, representing all destination objects
Note: Either the source context or the target context must represent a single object. You cannot have multiple objects at both the source and target ends. If the operation is “ADD”, both source and target must be single objects.
Example
The following code purges all Navigation links originating at the caller:
 
/* Get own context ID. Example presumes handle of current procedure previously
   stored in phSelf. */
 
RUN adeuib/_uibinfo.p 
    ( INPUT ?,
      INPUT "HANDLE " + STRING( phSelf ),
      INPUT "CONTEXT":U,
      OUTPUT cContextID ).
 
/* Remove all Navigation links */
RUN adeuib/_ablink.p
    ( INPUT "REMOVE":U,
      INPUT cContextID,
      INPUT "NAVIGATION":U,
      INPUT "*":U ).
Access section (adeuib/_accsect.p)
Use the adeuib/_accsect.p procedure to read and write code sections in AppBuilder. For example:
 
Calling sequence
RUN adeuib/_accsect.p
  ( INPUT        pc_mode,
    INPUT        pi_context,
    INPUT        pc_section,
    INPUT-OUTPUT pi_srecid,
    INPUT-OUTPUT pc_code ).
Input parameters
The adeuib/_accsect.p procedure takes the following input parameters:
pc_mode
A quoted character string that specifies the mode of operation. Valid values are:
*“GET” — Reads the contents of the section or returns the Unknown value (?)
*“SET” — Writes the contents of the section
*“DELETE” — Deletes the current section
You cannot actually delete either the MAIN-CODE-BLOCK or the DEFINITIONS sections (see pc_section below). The DELETE value empties the section but does not also remove the stub.
pi_context
The context ID of the object to access. If it is the Unknown value (?), AppBuilder assumes the current window or procedure.
pc_section
The name of the code section to access. Valid values are:
*DEFINITIONS
*MAIN-CODE-BLOCK
*TRIGGER:event-name
(For example, TRIGGER:CHOOSE)
*PROCEDURE:name:handler
(For example, PROCEDURE:mytest:maintain.p. See the “Examples” section below for a description of how you can use this.)
*FUNCTION:name
*XFTR:xftr‑name
When you have a TRIGGER, then pi_context refers to a widget. In all other cases, pi_context points to the procedure.
If pi_srecid is the Unknown value (?), then pi_context and pc_section are used to identify an existing section. If pi_srecid is known, then pc_section is ignored.
Input‑output parameters
The adeuib/_accsect.p procedure uses the following INPUT-OUTPUT parameters:
pi_srecid
The context ID of the current section. If its value is other than the Unknown value (?), pc_section is ignored.
pc_code
The contents of the trigger or other code section.
Return values
This procedure returns:
“Error”
Indicates that pi_context is not specified and there is no current procedure or window.
Examples
The following code resets the MAIN-CODE-BLOCK to an include file:
 
  /* Get the current value */
  pi_srecid = ?.
  RUN adeuib/_accsect.p ("GET", ?, "MAIN-CODE-BLOCK",
                         INPUT-OUTPUT srecid,
                         INPUT-OUTPUT code).
  IF RETURN-VALUE NE "Error" THEN DO:
    IF code NE "{include.i}" THEN DO:
      code = "{include.i}".
      RUN adeuib/_accsect.p ("SET", ?, ?,
                             INPUT-OUTPUT srecid,
                             INPUT-OUTPUT code). 
    END.
  END.
The following example creates a AppBuilder‑maintained procedure: a procedure that the Code Section Editor displays as a READ-ONLY procedure. The following code fragment calls adeuib/_accsect.p:
 
DEFINE VARIABLE code       AS CHARACTER NO-UNDO.
DEFINE VARIABLE section_id as INTEGER   NO-UNDO INITIAL ?.
 
RUN adeuib/_accsect.p (INPUT "SET":U,
                       INPUT ?, 
                       INPUT "PROCEDURE:mytest:maintain.p", 
                       INPUT-OUTPUT section_id,
                       INPUT-OUTPUT code).
In this example:
*The first INPUT parameter, “SET”:U, specifies SET mode; SET mode tells adeuib/_accsect.p to write or create a code section.
*The second INPUT parameter, ?, specifies the context ID of the object to access. By default, adeuib/_accsect.p interprets the Unknown value (?) to be the context ID of the current window or procedure.
*The third INPUT parameter, “PROCEDURE:mytest:maintain.p”, specifies the following:
*The type of section to create is an internal procedure
*The name of the internal procedure is mytest
*The procedure maintain.p handles generating the code for the internal procedure
*The first INPUT-OUTPUT parameter specifies the context ID of the section; this value must be the Unknown value (?) or pc_section is ignored.
*The final INPUT-OUTPUT is a character string that holds the contents of the section.
This maintain.p procedure generates the code for the mytest internal procedure. For example:
 
/*----------------------------------------------------------------------
File: maintain.p
 
Description:
    Sample procedure showing how a developer procedure can maintain an
      AppBuilder Code Section.
Input Parameters:
    p_id  - (INTEGER) context ID of the current procedure
    
Output Parameters:
    p_Code - (CHAR) code to return. (Including "END PROCEDURE." ). 
  
------------------------------------------------------------------------*/
DEFINE INPUT  PARAMETER p_id   AS INTEGER    NO-UNDO.
DEFINE OUTPUT PARAMETER p_code AS CHARACTER  NO-UNDO.
 
DEFINE VARIABLE ch AS CHARACTER NO-UNDO.
 
/* Line for comments. */
&SCOPED-DEFINE COMMENT-LINE -----------------------------------------------------------------------
/* Standard End-of-line character */
&SCOPED-DEFINE EOL CHR(10)
 
/* Get some info about the current procedure. */
RUN adeuib/_uibinfo.p (p_id, ?, "FILE-NAME", OUTPUT ch).
 
p_code = 
  "/*{&COMMENT-LINE}" + {&EOL} +
  "  Purpose:     Sample code for file " + ch + {&EOL} + 
  "  Parameters:  <none>" + {&EOL} + 
  "{&COMMENT-LINE}*/" + {&EOL} + {&EOL} +
  "   MESSAGE ’Hello World!’:U." + {&EOL} + {&EOL} +
  "END PROCEDURE.".
The maintain.p procedure generates a mytest procedure that the Code Section Editor displays as read only. The contents of the generated mytest procedure are:
 
/*-----------------------------------------------------------------------
  Purpose:     Sample code for file C:\WORK\V-CUST.W
  Parameters:  <none>
------------------------------------------------------------------------*/
 
   MESSAGE ’Hello World!’:U.
 
END PROCEDURE.
AppBuilder‑maintained procedures provide an alternative to traditional XFTR use. They basically fill the role of an XFTR with only a single WRITE handler. The advantages of AppBuilder‑maintained procedures overusing XFTR are:
*You can add and delete them programmatically using adeuib/_accsect.p.
*They are visible to you, the developer, so that you can see the code being generated.
The disadvantages are:
*They can be deleted by the user from the Code Section Editor menu (Edit/Delete Procedure).
*They cannot store data in comments used to rebuild the code section. That is, the contents of the AppBuilder‑maintained procedure must be derived totally from external sources or calls to adeuib/_uibinfo.p. For example, an XFTR handler can read a section and have it affect what it generates; however, an AppBuilder‑maintained procedure can only write code.
AppBuilder database table names (adeuib/_dbtbnam.p)
Use the adeuib/_dbtbnam.p procedure to have AppBuilder correctly generate table names based on setting the Qualify Database Fields with Database Names user preference. For example:
 
Calling sequence
RUN adeuib/_dbtbnam.p ( INPUT p_id, INPUT p_name_in, OUTPUT p_name_out ).
Input parameters
The adeuib/_dbtbnam.p procedure uses the following input parameters:
pi_context
The context ID of the current procedure (to obtain this ID, use adeuib/_uibinfo.p).
pc_name_in
A table name. This name might or might not be qualified with a database name.
Output parameter
The adeuib/_dbtbnam.p procedure uses the following output parameter:
pc_name_out
A table name that meets the settings of the Qualify Database Fields with Database Names user preference.
Example
 
DEFINE VARIABLE ch      AS CHARACTER NO-UNDO.
DEFINE VARIABLE db-tbl  AS CHARACTER NO-UNDO.
DEFINE VARIABLE proc-id AS INTEGER   NO-UNDO.
 
/* Get the context of the current procedure. */
RUN adeuib/_uibinfo.p (INPUT ?, INPUT ?, INPUT "PROCEDURE":U, OUTPUT ch).
proc-id = INTEGER(ch).
 
/* The user may have wanted to suppress the db name in AppBuilder. Ask
   AppBuilder to set up the database/table name. */
RUN adeuib/_dbtbnam.p (proc-id, "Sports.Customer":U, OUTPUT db-tbl).
 
MESSAGE db-tbl. 
AppBuilder information (adeuib/_uibinfo.p)
Use the adeuib/_uibinfo.p procedure to obtain information about the widgets and SmartObject instances in a design window. For example:
 
Calling sequence
RUN adeuib/_uibinfo.p
  ( INPUT  pi_context,
    INPUT  pc_name,
    INPUT  pc_request,
    OUTPUT pc_info ).
Input parameters
The adeuib/_uibinfo.p procedure takes the following input parameters:
pi_context
The context ID of the widget, SmartObject instance, code section, or procedure to access. If the Unknown value (?), AppBuilder assumes the current procedure. The value of pi_context can be the context ID for any of the following:
*An object. For example, you can obtain the context of a button, Btn_OK, with the following code:
 
RUN adeuib/_uibinfo.p (?,"Btn_OK","CONTEXT", OUTPUT c_info).
*A procedure. For example, you can obtain the context for the current procedure with the following code:
 
RUN adeuib/_uibinfo.p (?, ?, "PROCEDURE", OUTPUT c_info).
*A SmartObject instance. For example, you can obtain the context of a SmartObject instance with the following code:
 
RUN adeuib/_uibinfo.p (?, "HANDLE " + STRING(THIS-PROCEDURE).
*A code section. For example, you can obtain the context ID and contents of the MAIN-CODE-BLOCK section with the following code:
 
RUN adeuib/_accsect.p 
  ("GET", ?, "MAIN-CODE-BLOCK",  
    INPUT-OUTPUT i_context, 
    INPUT-OUTPUT c_code).
pc_name
A quoted character string that specifies the name of an object. This string has the following syntax:
 
Syntax 
{ object
        [ IN FRAME frame-name ] 
        [ IN WINDOW window-name ]
   |  object
        [ IN FRAME frame-name ] 
        [ IN PROCEDURE file-name ]
   |  HANDLE handle
}
In this syntax:
*object is the name of the widget or SmartObject instance.
*frame-name is the name of its parent frame.
*window-name is the name of its parent window.
*file-name is the name of the parent procedure file.
*handle is either the handle of a widget or the procedure handle for a SmartObject instance.
If you omit the FRAME or WINDOW option, the current window and current frame are assumed. If an object is unique in a window, you can refer to it as object IN WINDOW window-name.
To refer to a window or frame, preface the object with the type. For example, to find myFrame in myWin:
 
FRAME myFrame IN WINDOW myWin
To find window myWin:
 
WINDOW myWin
To find a procedure with the name p.w:
 
PROCEDURE p.w
The following special cases also apply:
*? — Gets the current object (shown in the AppBuilder’s main window)
*FRAME ? — Gets the current frame
*WINDOW ? — Gets the current window
*PROCEDURE ? — Gets the current procedure
If you use the HANDLE handle to reference an object, the handle can be either a HANDLE of the object or PROCEDURE-HANDLE for a SmartObject (converted to a STRING).
*PALETTE object — Object is the name directly following # in the cst file
pc_request
A quoted character string that specifies what to request. Valid requests are:
*“NAME” — Returns the name of the object.
*“ATTRIBUTES” — Returns a string with all of the attributes read from the cst file.
*“PROCEDURE” — Returns the STRING(pi_context) for the current procedure.
*“FILE-NAME” — Returns the name of the parent procedure file as last saved by AppBuilder; if not saved, returns “?”.
*“TEMPLATE” — Returns YES or NO depending on whether the current object is a template.
*“TYPE” — Returns the type of object.
*“HANDLE” — Returns either the handle of the object or the adm-object-handle of a SmartObject.
*“PROCEDURE-HANDLE” — Returns the procedure handle of a SmartObject.
*“CONTEXT” — Returns the context ID of the widget or SmartObject instance.
*“CONTAINS contains-phrase— Returns all objects contained in the current context (of a type or with key toggle boxes set). By default, returns the context ID of the items that match the filter, but you can ask for the list of names. The asterisk (*) returns all objects.
The syntax for contains-phrase is as follows:
 
Syntax 
{ * | object-list }
[
{ DISPLAY | ENABLE | MANUAL-HIGHLIGHT | MOVABLE
| RESIZABLE | SELECTABLE | SHARED | VISIBLE
| LIST-1 | LIST-2 | LIST-3 | LIST-4 | LIST-5 | LIST-6
}
{ TRUE/YES | FALSE/NO }
]
[
RETURN { CONTEXT | NAME } ]
In this syntax, object-list is a comma‑separated list (with no spaces) of object types.
*“FRAMES” — Returns all frames (in a window). This is shorthand for CONTAINS FRAME RETURN NAME.
*“FIELDS” — Returns dbfields in frame or dbfields in browse.
*“EXTERNAL-TABLES” — Returns the list of external tables for a procedure.
*“TABLES” — The tables used by the query of a FRAME, BROWSE, or QUERY object.
*“4GL-QUERY” — The ABL query for the query of a FRAME, BROWSE, or QUERY object.
*“WBX-FILE-NAME” — The name of the .wrx in which to save run‑time attributes for the OCXs in a procedure.
*“COMPILE-INTO-DIR” — The directory where the procedure file is compiled.
*“&FRAME-NAME [RETURN NAME]” — The context ID or name of the FRAME-NAME, or ?.
*“&QUERY-NAME [RETURN NAME]” — The context ID or name of QUERY-NAME, or ?.
*“&BROWSE-NAME [RETURN NAME]” — The context ID or name of BROWSE-NAME, or ?.
Other options
The following returns a comma‑separated list of procedure names:
 
RUN adeuib/_uibinfo.p
  (INPUT ?,                             /* P_context (INTEGER)   */
   INPUT "SESSION",                     /* p_name    (CHARACTER) */
   INPUT "PROCEDURES RETURN NAME",      /* P_request (CHARACTER) */
   OUTPUT name-list).                   /* p_info    (CHARACTER) */
The following returns the same list but uses context IDs instead of names:
 
RUN adeuib/_uibinfo.p
  (INPUT ?,                             /* P_context (INTEGER)   */
   INPUT "SESSION",                     /* p_name    (CHARACTER) */
   INPUT "PROCEDURES RETURN CONTEXT",   /* P_request (CHARACTER) */
   OUTPUT name-list).                   /* p_info    (CHARACTER) */
SECTIONS function
You can ask a procedure for the list of internal procedures and functions defined in AppBuilder. The list can return the names or context IDs of the procedure and function sections, which you can use in adeuib/_accsect.p to get, modify, or delete the contents of code blocks. For example:
 
Syntax 
SECTIONS PROCEDURE [ ,FUNCTION ]
[ RETURN { CONTEXT | NAME } ]
If you do not specify either RETURN CONTEXT or RETURN NAME, it returns the list in context ID order.
To obtain a list of all internal procedures in a file by name, use the following:
 
SECTIONS PROCEDURE RETURN NAME
To obtain all of the procedures and functions defined in a file, use the following:
 
SECTIONS PROCEDURE,FUNCTION
This returns the list in context ID order.
HTML-FILE-NAME
Returns the HTML filename associated with an HTML mapping object procedure.
BROKERURL
Returns the broker URL set in Web preferences, as shown:
 
RUN adeuib/_uibinfo.p (?,"SESSION":U,"BrokerURL":U,OUTPUT BrokerURL).
REMOTE
Returns TRUE if the Remote File Management button in AppBuilder is set to ’Remote’, otherwise returns FALSE, as shown:
 
RUN adeuib/_uibinfo.p (?,"SESSION":U,"REMOTE":U, OUTPUT RemoteFlag).
WEBBROWSER
Returns the Web browser set in Web preferences.
DATAOBJECT
Returns the SmartDataObject associated with the procedure, as shown:
 
RUN adeuib/_uibinfo.p (INTEGER(hProc),"","DataObject":U, OUTPUT SDOName).
DATAOBJECT-INCLUDE
Returns the name of the include file associated with the SmartDataObject of the procedure, as shown:
 
RUN adeuib/_uibinfo.p (INTEGER(hProc),"","DataObject-Include":U,
  OUTPUT SDOiName).
PALETTE-ITEM
For a given custom definition in a .cst file, returns the settings for ATTRIBUTES, LABEL, TEMPLATE, and FILES, as shown:
 
Syntax 
PALETTE-ITEM cst-obj-name
  [ ATTRIBUTES | LABEL | TEMPLATE | FILES ]
 
RUN adeuib/_uibinfo.p ( INPUT ?, INPUT "PALETTE-ITEM SmartDataObject":U,
  INPUT "ATTRIBUTES":U, OUTPUT Attributes).
Output parameter
The adeuib/_uibinfo.p procedure uses the following output parameter:
pc_info
Output value, cast as a character string.
AppBuilder create (adeuib/_uib_crt.p)
Use the adeuib/_uib_crt.p procedure to create objects in AppBuilder. You can create under program control the objects found in the custom object files. The TYPES, ARGUMENTS, and CUSTOM TYPES are the same as those defined in the custom object files. This acts just as if you choose a button from the Object Palette and insert it into a window or frame. For example:
 
Calling sequence
RUN adeuib/_uib_crt.p
  ( INPUT pi_parent ,
    INPUT pc_type ,
    INPUT pc_custom ,
    INPUT pd_Row ,
    INPUT pd_Column ,
    INPUT pd_height ,
    INPUT pd_width ,
    OUTPUT pi_context ).
Input parameters
The adeuib/_uib_crt.p procedure takes the following input parameters:
pi_parent
The context ID of the parent of the object to create. If this is the Unknown value (?), the parent is assumed to be the current frame. If there is no current frame, then the current window is assumed.
pc_type
The type of object to create (for example, “BUTTON” or “SmartObject”).
pc_custom
The name of the custom object type (for example, “OK Button”). If this is the Unknown value (?), the “&Default” object is created. For example:
 
"case:value"
Special cases of pc_custom
The following are some special cases of the pc_custom parameter:
"Custom:name"
The name of the custom object defined in custom files. This draws a Next button, as shown:
 
Custom:&Next
"SmartObject:object-file"
The name of a SmartObject to load. For example:
 
SmartObject: C:/Progra~1/OpenEdge/gui/object/p-nav.w
"SPECIAL:attributes-values"
This is similar to creating a new custom object file entry temporarily. The attributes and values are parsed the same way as entries in the custom object file. Blank lines are ignored. You must separate lines with a carriage return (that is, CHR(10)). For example:
 
"SPECIAL: " +
"BGCOLOR 7 " + CHR(10) +
"FONT 2 " + CHR(10) +
"NAME test".
pd_ROW
The ROW to create the object.
pd_COLUMN
The COLUMN to create the object.
pd_HEIGHT
The HEIGHT of the object in characters; if the Unknown value (?), the default height is used.
pd_WIDTH
The WIDTH of the object in characters; if the Unknown value (?), the default width is used.
Output parameter
The adeuib/_uib_crt.p procedure uses the following output parameter:
pi_context
The context ID of the object created. If the creation fails, this is the Unknown value (?). You can use this value as the object context ID for the companion programs, which are adeuib/_accsect.p, adeuib/_uibinfo.p, and adeuib/_uib_del.p.
Return values
The adeuib/_uib_crt.p procedure returns:
"Error"
If pi_context does not point to a valid object.
AppBuilder delete (adeuib/_uib_del.p)
Use the adeuib/_uib_del.p procedure to delete objects in AppBuilder, as shown:
 
Calling sequence
RUN adeuib/_uib_del.p ( INPUT pi_context ).
Input parameter
The adeuib/_uib_del.p procedure takes the following input parameter:
pi_context
The context ID of the object to delete. There is no default value for this; you must pass a valid context ID. This value is the same value returned by adeuib/_uibinfo.p.
Return values
This procedure returns:
"Error"
Indicates that pi_context does not point to a valid object.
"Fail"
Indicates that the object was not deleted.
AppBuilder dialog (adeuib/_uib_dlg.p)
Use the adeuib/_uib_dlg.p procedure to invoke a subset of AppBuilder’s dialog boxes, as shown:
 
Calling sequence
RUN adeuib/_uib_dlg.p 
  ( INPUT pi_context, INPUT pc_dname, INPUT-OUTPUT pc_args ).
Input parameters
The adeuib/_uib_dlg.p procedure takes the following input parameters:
pi_context
The context ID of the object to which the dialog box will apply.
pc_dname
A quoted character string that specifies the name of the AppBuilder dialog box to call. Valid values are:
*“QUERY BUILDER” — The context ID must be for a query, frame, or browse
*“COLUMN EDITOR” — The context ID must be for a browse
*“EXTERNAL-TABLES” — The context ID must be for a procedure
Input/output parameters
The adeuib/_uib_dlg.p procedure uses the following input/output parameters:
pc_args
A character string to send to the dialog box. For the Column Editor or the External Tables dialog box, you can send a table-list, which is a comma‑separated list of tables. For the Query Builder, you can specify a mode, which is a comma‑separated list having the following syntax:
 
Syntax 
{ ? | NORMAL | QUERY-ONLY | CHECK-FIELDS }
  [ NO-FREEFORM-QUERY ]
The values are as follows:
*? — The default. Changes the Query Builder to NORMAL mode. For queries, this means that the Fields button is disabled; for browsers, it means that all fields that are Query Builder options are enabled.
*“NORMAL” — Changes the Query Builder to NORMAL mode. For queries, this means that the Fields button is disabled; for browsers, it means that all fields that are Query Builder options are enabled.
*“QUERY-ONLY” — Specifies that the Query Builder be in QUERY-ONLY mode. This means that the fields button is disabled.
*“CHECK-FIELDS” — Specifies that the Query Builder be in CHECK-FIELDS mode. This means that if you try to leave the Query Builder and have not selected any fields, you are prompted to select fields.
*“NO-FREEFORM-QUERY” — Specifies that the Freeform Query button must be disabled.
Window save (adeuib/_winsave.p)
Use the adeuib/_winsave.p procedure to set an internal flag that indicates whether the window has been modified since it was last saved or opened. AppBuilder checks this flag whenever it closes a window:
*If the flag is TRUE, the window has recently been saved (or just opened).
*If the flag is FALSE, the window needs to be saved.
Whenever you modify something in the design window that will be reflected in its saved procedure file, call adeuib/_winsave.p to set the flag to FALSE:
 
Calling sequence
RUN adeuib/_winsave.p ( INPUT ph_handle, INPUT pl_saved ).
Input parameters
The adeuib/_winsave.p procedure takes the following input parameters:
ph_handle
The widget‑handle of the design window to mark as saved.
pl_saved
A logical value that indicates that the window has been saved or opened since it was last modified.
Example
 
RUN adeuib/_winsave.p (h_deswin, FALSE).
Reserved names (adeuib/_namespc.p)
Use the adeuib/_namespc.p procedure to register the names of variables or procedures that AppBuilder users cannot use. For example, if you write an XFTR that creates a procedure, you do not want an AppBuilder user to create an internal procedure with the same name. Similarly, if the XFTR defines variables, you want to restrict AppBuilder users from using those variable. For example:
 
Calling sequence
RUN adeuib/_namespc.p ( INPUT pi_context, INPUT pc_mode, INPUT pc_list ).
Input parameters
The adeuib/_namespc.p procedure takes the following input parameters:
pi_context
The context of the procedure object to access. If this is the Unknown value (?), then get the current procedure. If a procedure object cannot be found, returns ERROR.
pc_mode
The action to perform. Valid actions are as follows:
 
Syntax 
{ RESERVE | UNRESERVE }
[
{ VARIABLE | PROCEDURE }
[ NAME | NAMES ]
]
pc_list
A comma‑separated list of names to add or remove.
If you try to reserve a name that is already in use, warnings are generated; however, the reservation is made, so that if you delete the widget that uses the name, you cannot use it again. You can unreserve any name, even one that it not reserved, but no warning is generated.