Reference Guide > W Routines > WwLoop Procedure
  

WwLoop Procedure
Handles the dispatching of events and calling of callbacks.
 
note
The WwLoop function should only be used in the main event loop. Do not use it to create an event loop within an event loop. PV‑WAVE could become unstable.
To create additional main windows, use the WwMainWindow command instead of a secondary event loop.
Usage
WwLoop
Parameters
None.
Returned Value
None.
Keywords
Noblock — If specified and nonzero, events are dispatched in the background, and WwLoop returns immediately to process PV‑WAVE commands from the command line.
Discussion
WwLoop causes PV‑WAVE to loop indefinitely, processing the events and dispatching callbacks. WwLoop is always the last PV‑WAVE Widgets command in a PV‑WAVE Widgets procedure.
 
note
For interapplication development using cwavec() or cwavefor(), the default behavior of WwLoop is to block, even if the Noblock keyword is set. To force nonblocking, set Noblock = 2 and then call WtProcessEvent periodically to service the event loop.
Example
For examples showing the use of WwLoop, see any of the PV‑WAVE Widgets widget-creation routines, such as WwButtonBox Function, WwCommand Function, WwControlsBox Function, WwList Function, and so forth.
See Also
WtProcessEvent
For detailed information on GUI development, refer to the PV‑WAVE Application Developer’s Guide.
For more information about how to write an application program based on PV‑WAVE Widgets, refer to Using Wave Widgets in the PV‑WAVE Application Developer’s Guide.

Version 2017.1
Copyright © 2019, Rogue Wave Software, Inc. All Rights Reserved.