Tap Forms Database Pro for Mac, iPhone, iPad and Apple Watch › Forums › Using Tap Forms 5 › Progress Bar Question / Defect
- This topic has 5 replies, 3 voices, and was last updated 5 years, 10 months ago by
Rocky Machado.
-
AuthorPosts
-
December 24, 2019 at 9:27 AM #38888
Rocky MachadoParticipantHi – I am trying to implement the progress bar. I have a function that has multiple steps (calls other functions). For each step, I want to update the progress text. So I am using the show method before every step. I notice once I complete all the steps and execute dismissProgress() the dialogue goes away. However, if I go back into my code and save a change. the progress bar shows up again and I have to click on the cancel button. Am I not implementing the show method correctly? in the Progress are there other methods I can use to update the progress text? On the website I did not see any documentation on the progress API.
progressBar.show('Applying Trade Strategy Option Assignment Changes...'); progressBar.updateProgress(1); handleTradeStrategyOptionAssignment(); progressBar.show('Applying Trade Strategy Stock Changes...'); progressBar.updateProgress(2); handleTradeStrategyStock(); progressBar.show('Applying Trade Strategy Inconsistency Changes...'); progressBar.updateProgress(3); handleTradeStrategyInconsistency(); progressBar.show('Generating and Applying Stock Key...'); progressBar.updateProgress(4); generateStockKey(); progressBar.show('Generating and Applying Open/Close Group Key...'); progressBar.updateProgress(5); generateOpenCloseGroupKey() //-- Generates a key for open and close transactions progressBar.show('Adjusting and Applying Stock Assignment Changes...'); progressBar.updateProgress(6); adjustAssignedStock(); //-- Adjust Price and amount on stocks that were assigned progressBar.show('Applying Profit/Loss Calculations...'); progressBar.updateProgress(7); handleProfitLoss(); progressBar.dismissProgress();December 24, 2019 at 1:33 PM #38896
BrendanKeymasterHi Rocky,
I’ve just updated the docs to show the Progress API.
I haven’t added the ability for you to update the label outside of the initial text that is displayed at the beginning when you call
progress.show(). You should not call show multiple times before dismissing it.However, in the next update you’ll be able to specify
progress.label = "some label";and Tap Forms will update the label above the progress bar. But not until after the holidays when I publish the next update.Thanks,
Brendan
December 25, 2019 at 7:05 PM #38907
Sam MoffattParticipantAwesome addition! I’ve just been dismissing and re-showing the progress bar for the use case I have. Is it possible to reset the state entirely to change the total as well? It’s a little weird now where the sheet pops in and out, if I could change the total and the label then I could show it once and then update the label and total as I shift between stages of a script.
December 26, 2019 at 12:24 AM #38913
BrendanKeymasterOk, I’ve added
progress.setTotalCount(100);to the API for the next update.December 26, 2019 at 1:52 AM #38921
Sam MoffattParticipantThanks!
December 26, 2019 at 7:25 AM #38937
Rocky MachadoParticipantThanks! Brendan for the changes.
-
AuthorPosts
You must be logged in to reply to this topic.