ui.Interface.refresh

Synchronize the user interface with the front-end.

Syntax

ui.Interface.refresh()

Usage

The ui.Interface.refresh() class method forces a synchronization of the abstract user interface tree with the front-end. This means that the end user will immediately see the recent form modifications made by the program.

By default, during an interactive instruction like DIALOG, the AUI tree is refreshed automatically, when the runtime system gets the control back after user code execution. Thus, there is no need to call the refresh method in regular code.

Important: The AUI tree is automatically synchronized by the runtime system, when dialog intruction gives the control back to the end user. The ui.Interface.refresh() method must only be used in specific cases, to refresh the display while processing. For example, to show a "Please wait" message, or to implement a progress dialog window with a PROGRESSBAR. The ui.Interface.refresh() method should not be called more often than once in one second.

Example

MAIN
    DEFINE i INT
    FOR i = 1 TO 10
        DISPLAY SFMT("Please wait, doing step #%1", i) AT 1,1
        CALL ui.Interface.refresh()
        SLEEP 1
    END FOR
END MAIN