Progress Bars
Posted: Mon Feb 16, 2015 11:14 pm
Hi,
I'm trying to let myself know that the app I'm creating is in fact doing something long-winded / is not stalled - and I came up with both the busy indicator and the progress bar. Generally simple stuff but I'm now lost'... again !
Both the busy indicator and the progress bar work when the engine isn't completely tied up... by that I mean, for example, transferring multiple files from one place to another or deleting multiple files. In both cases I use a repeat structure and insert a 'wait 0 milliseconds with messages' command within the repeat structure (between each transfer or delete operation) to ensure that any waiting messages (like updating a 'progress bar') are handled. The end result is that I see something going on whilst a long-winded process is 'hogging' resources... All well and good... until...
One of my files is a ZIP file (created by my app with a progress bar), all well and good. Once the ZIP file is created it can be optionally copied to some other location.
The ZIP file (today) has exceeded 200MB in size (contains multiple picture images etc) and during the copy process (which can take up to 40 seconds) I note the busy indicator / progress bar stalls / halts for the duration of the copy... which can cause concern... and my Android ICS device to produce a warning "...stopped responding' message... Yuch - ugly !
So, to my question :
Is there a way to copy a large (in my case ZIP) file from one place to another whilst having a progress bar / busy indicator update ? I did see somewhere that with a text file one can (effectively) use a repeat structure to copy chunks (say 1KB) of data from a large file to a new location until an 'EOF' is encountered...
Can one do this with a ZIP file and is there an example - I can't find where I found this method / example in the past...
Thanks a mil. Much appreciated.
Regards
Trax
I'm trying to let myself know that the app I'm creating is in fact doing something long-winded / is not stalled - and I came up with both the busy indicator and the progress bar. Generally simple stuff but I'm now lost'... again !
Both the busy indicator and the progress bar work when the engine isn't completely tied up... by that I mean, for example, transferring multiple files from one place to another or deleting multiple files. In both cases I use a repeat structure and insert a 'wait 0 milliseconds with messages' command within the repeat structure (between each transfer or delete operation) to ensure that any waiting messages (like updating a 'progress bar') are handled. The end result is that I see something going on whilst a long-winded process is 'hogging' resources... All well and good... until...
One of my files is a ZIP file (created by my app with a progress bar), all well and good. Once the ZIP file is created it can be optionally copied to some other location.
The ZIP file (today) has exceeded 200MB in size (contains multiple picture images etc) and during the copy process (which can take up to 40 seconds) I note the busy indicator / progress bar stalls / halts for the duration of the copy... which can cause concern... and my Android ICS device to produce a warning "...stopped responding' message... Yuch - ugly !
So, to my question :
Is there a way to copy a large (in my case ZIP) file from one place to another whilst having a progress bar / busy indicator update ? I did see somewhere that with a text file one can (effectively) use a repeat structure to copy chunks (say 1KB) of data from a large file to a new location until an 'EOF' is encountered...
Can one do this with a ZIP file and is there an example - I can't find where I found this method / example in the past...
Thanks a mil. Much appreciated.
Regards
Trax