Progress
AppBuilder
Developer’s Guide
AppBuilder Information (adeuib/_uibinfo.p)
Use the
adeuib/_uibinfo.p
procedure to obtain information about the widgets and SmartObject instances in a design window:
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 unknown (?), 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:
- A procedure. For example, you can obtain the context for the current procedure with the following code:
- A SmartObject instance. For example, you can obtain the context of a SmartObject instance with the following code:
- A code section. For example, you can obtain the context ID and contents of the MAIN-CODE-BLOCK section with the following code:
pc_name
A quoted character string that specifies the name of an object. This string has the following syntax:
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 widget-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 frame f:
To find window w:
To find a procedure with the name
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 WIDGET-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 widget-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:
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 4GL 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
To return a comma-separated list of procedure names:
The following returns the same list but uses context IDs instead of names:
SECTIONS
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:
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:
To obtain all of the procedures and functions defined in a file, use the following:
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:
REMOTE
Returns TRUE if the Remote File Management button in AppBuilder is set to ’Remote’, otherwise returns FALSE:
WEBBROWSER
Returns the Web Browser set in Web Preferences.
DATAOBJECT
Returns the SmartDataObject associated with the procedure:
DATAOBJECT-INCLUDE
Returns the name of the include file associated with the SmartDataObject of the procedure:
PALETTE-ITEM
For a given custom definition in a .cst file, returns the settings for ATTRIBUTES, LABEL, TEMPLATE, and FILES:
Output Parameter
The
adeuib/_uibinfo.p
procedure uses the following output parameter:pc_info
Output value, cast as a character string.
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |