Legato
Legato

GoFiler Legato Script Reference

 

Legato v 1.5b

Application v 5.24b

  

 

Chapter FiveGeneral Functions (continued)

Yield Function

Overview

The Yield function releases control of the current thread to the application or system.

Syntax/Parameters

Syntax

int = Yield ( [boolean update] );

Parameters

update

An optional boolean flag that can controls the updating of the frame window. If update is TRUE, it forces the frame window and a progress window (if present and associated with it) to update. This can help ameliorate painting issues when opening edit windows or projects. This option is inert if the script is run without a visible frame window (e.g., from the command line).

Return Value

Returns an int as ERROR_NONE.

Remarks

The Yield function forces a yield of execution, allowing the application or system to assume control. The Yield function allows other primary thread operations to occur, which may include painting (which is generally low priority and not addressed unless the script goes idle). If the script is running in the primary process thread and the frame window is open, yielding control of the thread will allow the message loop to run. This can result in additional commands being unexpectedly executed, which may cause undesirable behavior.

If the script is running from the command line or its own thread, the Yield function releases the thread to the system which may return it immediately. The ProgressUpdate function also causes the script to yield to the application.

Related Functions

Platform Support

Go13, Go16, GoFiler Complete, GoFiler Corporate, GoFiler, GoFiler Lite, GoXBRL

Legato IDE, Legato Basic