Module to include a threshold for progress bar display.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
Components/prog.4dbase PROG_Build no longer necessary. May 20, 2014
interpreted/prog.4dbase PROG_Build no longer necessary. May 20, 2014
matrix/prog.4dbase PROG_Build no longer necessary. May 20, 2014
.gitattributes Initial commit. Dec 21, 2013
.gitignore Initial commit. Dec 21, 2013
README.md

README.md

prog v13

IMPORTANT NOTE

prog v13 is unlikely to receive further updates. There are some v14 features I would like to take advantage of. So future development will be happening in the v14 component only.

Description

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.

Contents

  • The Components folder contains the compiled version of the "prog.4dbase" component suitable for installation in any 4D v13 database.
  • The interpreted folder contains the interpreted version of the "prog.4dbase" component suitable for installation in any 4D v13 database.
  • The matrix folder contains the component source code.

Usage

(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.