I'm working on the version 10 platform and enjoying it highly, but now stumbled upon a small problem. I have a screen in my mobile app where I synchronize some data, i like to show the progression to the user using a progress bar, but from code there is no way I can change the value of the progresssbar. Anuone has an idea hw to accomplish this ?
Can you share an image or oml of your logic, so that I can help you with the best approach?
João Neves wrote:
share an image or oml of your logic, so that I can help you with the best approach?
This is the screen, the loading boilers text is on the prgress bar
When pressing the button Start sync, i start connecting to the server to get my boilers and other stuff into the local client storage
I get the boilerlist using a rest call then load it to my local storage. In the assign I want to set the value of the progressbar to indicate how far the loading process is
But be careful and don't execute this JS Node very often as it will have significant performance impact and slow down the whole operation. I suggest that you do this once in a while (for instance for every 30 iterations or more - you'll have to tweak this).
For more information about this $public JS API check out here:
Have in mind that this is only available in platform version 10.0.200 or above.
It's back to the old days of windows programming ;-) fiddeling around with some java script isn't very nice but ok should be do-able, thx for the sollution, will try this out.
It turns out its sufficient to just link a screen variable to the progressbar, and updating this variable in the load process automatically will result in the progressbar moving without any java code
It might work but its guaranteed that the progress will be updated (rendered).