ProgressView

  1. 5 years ago

    Joel_Eisenstat

    10 Dec 2018 User since 2016

    Good morning ,
    Wondering on how to move the ProgressView with animation.

    ProgressView1.value = 0.00;
    ProgressView1.refresh();
    var i = 1.00;
    while (i < 50000.00) {
    var prog = (i/50000.00) ;

    ProgressView1.setProgress(prog, true);
    ProgressView1.refresh();

    i += 1.00;

    }
    Console.write("Done \(i)");
    return i ;

    Just directly goes to the finish point , no animation of ProgressView.
    For smaller values I can see the Float prog is correct in the console.
    Regards,
    Joel

  2. marco

    10 Dec 2018 Administrator User since 2016

    50000 seems a huge number, I mean, you need a lot of values in order to see the increase in pixel size.

  3. Joel_Eisenstat

    10 Dec 2018 User since 2016

    Sorry to be so confused, I assumed ( perhaps incorrectly) the set progress/refresh would walk the progress bar for each point. I get the same result with either a low or high value, snaps to the 1.0 value.

  4. marco

    10 Dec 2018 Administrator User since 2016

    It is a value between 0.0 and 1.0

  5. Joel_Eisenstat

    10 Dec 2018 User since 2016

    my understanding is that as you obtain float values between 0.0 and 1.0 the bar is updated and progresses
    , such as i /total records, refresh should have the bar progress. I must be missing something , perhaps a one liner ( or 2) example.

  6. marco

    11 Dec 2018 Administrator User since 2016

    @Joel_Eisenstat try with the following code:

    ProgressView1.value = 0.00;
    var i = 1.00;
    while (i < 50000.00) { 
        ProgressView1.value += (i/50000.00);
        i += 1.00;
    }
    Console.write("Done \(i)");
    return i;
  7. Joel_Eisenstat

    12 Dec 2018 User since 2016

    Thanks but still 'snaps' to the end point , no incremental animation

  8. marco

    12 Dec 2018 Administrator User since 2016

    @Joel_Eisenstat I am 99.9% sure that it works fine, it is just too fast because there is nothing really done inside the while loop except increment a number.

  9. Joel_Eisenstat

    12 Dec 2018 User since 2016

    Ok will test with a routine that brings the Postgres parts records/images to onboard SQLIte ( as to minimize network traffic) . Just under 8000 records so should slow down the loop to test the 0.1%

or Sign Up to reply!