The prog component extends 4D's Progress module to include a threshold for progress bar display. I.e. this component gives you the ability to only display a progress bar for slow operations.
The algorithm is straightforward and works best with linear operations.
- The Components folder contains the compiled version of the "prog.4dbase" component suitable for installation in any 4D v14 database.
- The interpreted folder contains the interpreted version of the "prog.4dbase" component suitable for installation in any 4D v14 database.
- The matrix folder contains the component source code.
(optional) Use PROG_Startup at the beginning of any process that will use this component. PROG_Create also calls PROG_Startup as needed.
Use PROG_Create to create a progress bar. Pass the threshold in $3. If the component detects that an operation will take longer than this threshold, the progress bar will be displayed. If not the progress bar is never shown.
Use PROG_Update to update the progress of the current operation. Use this method in a loop, for example.
Use PROG_Close to close a progress bar.
Use PROG_CloseAll to close all progress bars.
Note: all progress bars are displayed in the same window, per-process.