Revolution is very slow to refresh fields. How can I speed it up?

Ken Ray kray at sonsothunder.com
Sat Apr 8 20:54:43 EDT 2006


On 4/8/06 11:03 AM, "Rob Cozens" <rcozens at pon.net> wrote:

> 
> Alex & Geoff,
> 
>> You don't need to know how many ticks it takes.
> 
> OK, I'll bite: just how does one set the end value of the scrollBar if
> one does not have an idea of how many loops or how many ticks the
> entire process will take?
> 
> Suppose, for example, one is downloading a file.  Changing the
> thumbPosition every fixed number of ticks means that after x tricks the
> progress bar will have the same setting regardless the file size (eg: a
> 5MB file download will show exactly the same progress as a 10MB
> download or a 100MB download).
> 
> Also, how does one know the progress bar won't get completely to the
> end well before the process is completed?

Because in the case of a file download, you can do things based on the total
size of the file compared to the amount that's already been downloaded. I
generally always set my progress bars to a 1 - 100 range so that I can do:

  trunc(((amount downloaded) / (total amount)) * 100)

and set the thumbposition to that value (which will always be between 1 and
100).

But you're right, Rob... you have to know *something* on which you can hang
your hat... either it's the total number of steps, or the percentage of
downloaded file size over total file size, or the total number of ticks or
milliseconds, etc.


Ken Ray
Sons of Thunder Software
Web site: http://www.sonsothunder.com/
Email: kray at sonsothunder.com




More information about the use-livecode mailing list