Release 10.1A: OpenEdge Development:
AppBuilder

> ## AppBuilder information (adeuib/_uibinfo.p)

> Use the `adeuib/_uibinfo.p` procedure to obtain information about the widgets and SmartObject instances in a design window:

> 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 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:

>     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 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`:

>     FRAME f IN WINDOW w

> To find window `w`:

>     WINDOW w

> 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 `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:

> 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 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:

>     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:

> 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:

>     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`:

>     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:

>     RUN adeuib/_uibinfo.p(INT(hProc),"","DataObject":U, OUTPUT SDOName).

> ##### DATAOBJECT-INCLUDE

> Returns the name of the include file associated with the SmartDataObject of the procedure:

>     RUN adeuib/_uibinfo.p(INT(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`:

> 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.

Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095