XADhandleevents


Purpose
Handling events during program execution.
Synopsis
procedure XADhandleevents
Further information
If a long calculation (e.g. optimization) is initiated by the event handler callback, the user interface will freeze. This is due to the fact that the processor intensive operations take place on the same thread as the code that draws the user interface or responds to user events (after all, we are dealing with an event). To avoid this phenomenon, call XADhandleevents at regular intervals (e.g. during Optimizer callbacks) to allow the user to interact with the user interface. Use caution, however as the following call sequence is likely to occur:
guievents(1,1)
calls minimize(objective)
calls globallog
calls XADhandleevents
calls guievents(1,10)
calls ???

While an optimization is running events should be dealt with quickly and with little (if well understood) or no side effects. In this situation one could use XADseteventcallback to switch to an alternative, simplified event handler callback.
Related topics
XADseteventcallback


If you have any comments or suggestions about these pages, please send mail to docs@dashoptimization.com.