Progress Bar Question / Defect

Viewing 5 reply threads
  • Author
    Posts
  • December 24, 2019 at 9:27 AM #38888

    Rocky Machado
    Participant

    Hi – 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

    Brendan
    Keymaster

    Hi 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 Moffatt
    Participant

    Awesome 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

    Brendan
    Keymaster

    Ok, I’ve added progress.setTotalCount(100); to the API for the next update.

    December 26, 2019 at 1:52 AM #38921

    Sam Moffatt
    Participant

    Thanks!

    December 26, 2019 at 7:25 AM #38937

    Rocky Machado
    Participant

    Thanks! Brendan for the changes.

Viewing 5 reply threads

You must be logged in to reply to this topic.