ui.Interface.refresh()

ui.Interface.refresh() is used to synchronize the client with the server.

Syntax

ui.Interface.refresh()

Arguments

takes no input arguments

Usage and examples

Normally the client refreshes the screen only when there is a user interaction. If there is no user interaction, but you still need the client to refresh the displayed data, use this method. You can change the refresh mode using the AUTOREFRESH statement.

Here is an example of the refresh() method used in the first refreshment mode when the displayed values become visible only once a screen interaction statement was executed:

MAIN

DEFINE f001 INTEGER

  OPEN WINDOW w WITH FORM "various"

    FOR f001 = 1 TO 10

      DISPLAY BY NAME f001

        # Without this line the program will be executed silently and finish

        # without the user being able to see the output at all.

        CALL ui.Interface.refresh()

      SLEEP 1

    END FOR

END MAIN

If there is a long operation without a user interaction on the application start, add ui.Interface.refresh() to the MAIN statement to prevent the application timeout:

MAIN

DEFINE i, j, k, z INT,

       startTime, finishTime DATETIME HOUR TO FRACTION,

       totalTime INTERVAL HOUR TO FRACTION

CALL ui.Interface.refresh()

  FOR i = 1 TO 400

    FOR j = 1 TO 1000

      FOR k = 1 TO 1000

        LET z = 1

      END FOR

    END FOR

  END FOR

...

END MAIN

 

Contact Us

Privacy Policy

Copyright © 2024 Querix, (UK) Ltd.