Hi,
Is the progress bar corretly updated during the execution ?
Why do you believe that the line of code slow down the execution of the NGClient compared to update a dataprovider ? There is actually no difference.
Surely updating the UI of the progressbar is a round-trip server to client, therefore updating the progress bar for each value (100 round-trips) will be slower then updating the bar for each 10 units (10 round-trips).
What you need to consider is instead the fact that a runtime change to an element's property is not immediately pushed to the UI; servoy keeps track of the runtime changes and push them all togheter to the UI when the method execution is terminated or as soon you execute an element's API on the UI (any element's API of any element present in UI) or if you call application.updateUI();
For example there is a difference between:
- Code: Select all
// UI is updated only when the the loop is over
for (var index = 0; index <= 100; index++) {
elements.bs_progressbar.value = index;
application.sleep(50);
}
and
// UI is updated at each iteration.
for (var index = 0; index <= 100; index++) {
elements.bs_progressbar.value = index;
application.updateUI();
application.sleep(50);
}
You can use the default progress bar just fine, there is no need to build your own.
About your last question, there is not a video or tutorial on how to build web components. Building components requires HTML/CSS knowledge; documentation on Servoy web components is available in this wiki section
https://wiki.servoy.com/display/public/DOCS/NGClient ; it explains how to build components from the Servoy point of view, the angular directives offered by Servoy (sort Servoy's api for components), but it won't cover any HTML/CSS topic.