UI_WAIT_UNTIL()
Syntax
Result_Flag as L = WAIT_UNTIL( Logical_Expression as C [, Every_N_Seconds as N [, Timeout_After as N ]] )
|
Argument |
Description |
|
Logical_Expression |
An Xbasic expression that resolves to either .T. (TRUE) or .F. (FALSE). |
|
Every_N_Seconds |
Optional. Default = .001 seconds. The interval in seconds between checks of Logical_Expression. |
|
Timeout_After |
Optional. Default = forever. The number of seconds to wait before returning to the script, regardless of Logical_Expression. |
Description
The UI_WAIT_UNTIL()pauses a script until UI_MODELESS_DLG_EXIST() returns .T. (TRUE) or .F. (FALSE). Use this function when the testing if some UI component is present.
When the Logical_Expression is .T., the function sets Result_Flag to .T.. If, after the interval specified by Timeout_After, the Logical_Expression is still not TRUE, the function sets Result_Flag to .F. (FALSE). If Timeout_After is not specified, then Alpha Five will wait indefinitely until the Logical_Expression is .T..
Supported By
Alpha Five Version 8 and Above
Limitations
Desktop applications only.
Example
|
dim code as c code = <<%code% ui_modeless_dlg_exist("MyModelessXdialog") = .f. %code% flag_result = ui_wait_until(code) if flag_result = .t. then 'specify code here that executes when MyModelessXdialog has closed end if |
See Also