Progress bars 101
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- Posts: 746
- Joined: Sun Feb 04, 2007 11:01 pm
Progress bars 101
Hello everybody,
I wanted to see if I could get a little progress bar 101. I'm looking to have a progress bar run during the time the user is importing and exporting data to and from a data storage file. I'm fairly familiar with Rev so I just need a kick start. Or if there is a tutorial on progress bars out there someplace that would be good too.
Thanks allot,
Tom
I wanted to see if I could get a little progress bar 101. I'm looking to have a progress bar run during the time the user is importing and exporting data to and from a data storage file. I'm fairly familiar with Rev so I just need a kick start. Or if there is a tutorial on progress bars out there someplace that would be good too.
Thanks allot,
Tom
Tom
MacBook Pro OS Mojave 10.14
MacBook Pro OS Mojave 10.14
Re: Progress bars 101
Tom,
I attach a little stack that shows a progress bar. I don't know if it is what you want.
Just a little note. To give feedback during a long transaction is definitely helpful for the user. On the other hand it takes time to refresh the screen and that adds to the execution time.
So you might have to decide just how much feedback you want to give, every time something changes or every tenth time or even 1000th depending on what you do. But you will find that out if you experiment a little with the progress bar.
regards
Bernd
I attach a little stack that shows a progress bar. I don't know if it is what you want.
Just a little note. To give feedback during a long transaction is definitely helpful for the user. On the other hand it takes time to refresh the screen and that adds to the execution time.
So you might have to decide just how much feedback you want to give, every time something changes or every tenth time or even 1000th depending on what you do. But you will find that out if you experiment a little with the progress bar.
regards
Bernd
- Attachments
-
- progressExample.rev.zip
- (1.15 KiB) Downloaded 277 times
-
- Posts: 746
- Joined: Sun Feb 04, 2007 11:01 pm
Re: Progress bars 101
Bernd,
Thank you. That's just what I needed. Not to say I won't have more questions but this will get me started nicely.
Tom
Thank you. That's just what I needed. Not to say I won't have more questions but this will get me started nicely.
Tom
Tom
MacBook Pro OS Mojave 10.14
MacBook Pro OS Mojave 10.14
-
- VIP Livecode Opensource Backer
- Posts: 10057
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: Progress bars 101
A tip about showing progress bars on Mac, FWIW: the Mac progress bar rendering is so computationally intensive that updating the progress bar any more frequently than absolutely necessary can significantly impair your process' overall performance.
One way to reduce the number of times you call it is to use the mod operator in your loop, updating it every hundred times (or whatever other number would make sense for the amount of iterations you're running) through the loop instead of every time:
One way to reduce the number of times you call it is to use the mod operator in your loop, updating it every hundred times (or whatever other number would make sense for the amount of iterations you're running) through the loop instead of every time:
Code: Select all
put 0 into i
repeat for each line tLine in tData
add 1 to i
if i mod 100 = 0 then
set the thumbpos of sb 1 to i
end if
-- other processing here:
end repeat
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: Progress bars 101
Could someone please tell me what a "Progress bar 101" is?
Thanks!
Thanks!
Re: Progress bars 101
Klaus,
in the USA college/university courses often numbered, 101 beeing the very first course on a subject in the first year. So it means for beginners on a subject. I don't know how far they count but you could probably teach at least 999
regards
Bernd
in the USA college/university courses often numbered, 101 beeing the very first course on a subject in the first year. So it means for beginners on a subject. I don't know how far they count but you could probably teach at least 999

regards
Bernd
Re: Progress bars 101
Hallo Bernd,
heissen Dank für diese Info
heissen Dank für diese Info
