Progress Bar Speed Issue!?
Posted: Tue Jun 02, 2015 1:40 pm
Hi,
I feel really sorry to spam this forum but I always get this type of error that no one else experience them before
I can not even describe the issue but I will give it a try.
The issue is that my progress bar is not updating during repeat loop continuously.
It will get updated only when last item is done. So as it stands livecode progress bar is either empty or 100% full.
As soon as I put answer "blabla" in the middle of the loop my progress bar starts to get updated
1,2,3,4...100% but asap I will comment this line out like I mentioned I see only empty or 100%.
That is impossible because I am trying to update DB with 1000 lines and it takes about 5 seconds when I see answer "completed".
It seems like livecode doesnt have enough time to update screen with correct thumbPosition
My code
Any help will be appreciated.
I feel really sorry to spam this forum but I always get this type of error that no one else experience them before
I can not even describe the issue but I will give it a try.
The issue is that my progress bar is not updating during repeat loop continuously.
It will get updated only when last item is done. So as it stands livecode progress bar is either empty or 100% full.
As soon as I put answer "blabla" in the middle of the loop my progress bar starts to get updated
1,2,3,4...100% but asap I will comment this line out like I mentioned I see only empty or 100%.
That is impossible because I am trying to update DB with 1000 lines and it takes about 5 seconds when I see answer "completed".
It seems like livecode doesnt have enough time to update screen with correct thumbPosition
My code
Code: Select all
on saveLocation
put the number of lines of fld "fldValues" into tNumOfLines
set the endValue of scrollbar "progressBar" to tNumOfLines
put 0 into tCurrentValue
repeat for each line x in field "fldValues"
wait 20 milliseconds with messages
-- database work for create records
--answer it
--answer x
add 1 to tCurrentValue
put tCurrentValue into field "counter" /* Just a test to see if field will be updated/changed with => its not */
set the thumbPosition of scrollbar "progressBar" to tCurrentValue
if tCurrentValue is tNumOfLines then
answer "Completed."
end if
end repeat
end saveLocation