Progress Indicator Object

Can anyone supply the syntax for the Progress Indicator Object statement?

Jim seems to have created this object for his own use in the ProgressAlert statement. The bar he uses in that alert is setup with this formula.

Screen Shot 2021-09-04 at 10.32.46 AM

It would appear that you write a formula that calculates the percentage of progress, and put it in the formula pane for the object. Whenever that formula is triggered, the object will be updated.

In this case, Jim is setting a variable, _ProgressPercentage, to that percentage, and then doing a ShowVariables to trigger the formula. If the variable doesn’t yet exist, or have a value, catcherror( will return a 0.

Expanding on Dave’s information I created a ProgressIndicator object with this formula:

catcherror(0,«progBar»)

My procedure had this code:

letfileglobal progBar=0
for i,1,1000
    progBar= i * .1
    showvariables progBar
endloop
beep
progBar=0
showvariables progBar

When run the progress bar slowly fills in until complete and then beeps and resets.

Another alternative to using a standalone progress bar is to use the banner area in the toolbar. Here is code I used to put a message and icon in there and slowly fill the banner as progress proceeded.

setbannericon "<char:0xf085:FontAwesome>"
setbannermessage "End of Time"
setbannerprogressbar .01
for i,1,1000
    setbannerprogressbar i * .001
endloop
beep
setbannericon ""
setbannermessage ""

The original question was about the syntax of the Progress Indicator Object “statement”, there is no such statement. Maybe you meant the formula to be used in the object? In that case David and Gary have done an excellent job at supplying the missing documentation for the Progress Indicator Object.

Ja, obviously an object not a statement. I see where I went wrong. The Help page for the ProgressBar statement says " Note: This statement is retained for compatibility with legacy databases, but for new applications the recommended practice is to use a Progress Indicator Object."

Thank you David and Gary. This worked perfectly. I opened the form that contains the progressindicator object with an opendialog statement, which disabled mouse clicks on other forms and DBs while my procedure was running. There is some small amount of time added to the procedure running a loop, but not significant. (One procedure added 1-2 seconds to a procedure that otherwise took 34 seconds.)

Me three. Thanks so much for the bootleg documentation, I got my progress bar running perfectly in a dialog!

When finished, it disappears from the form only of it’s set for Indeterminite. Otherwise it hangs around at about the 1% point even with Display When Stopped unchecked.

When set to Indeterminite it’s a great indicator that the program is working.

You can force the Progress Indicator Object to disappear when set to 0 by changing the Indeterminate setting to -1. Here I have named the Progress Indicator Object “progBar” and have named the progress variable “theProg”.

theProg=0
changeobject "progBar","$ProgressIndicatorIndeterminate","-1"

When you want to set the progress bar to something other than 0 and make it visible you would have to reset the indeterminate value to 0 which turns that option off.


changeobject "progBar","$ProgressIndicatorIndeterminate","0"
theProg=1
showvariables theProg