Just to clarify my own post a little...
The backup process divides into a number of steps each of which takes
a while. I want a way of updating the transcript window between
steps, such as "Archive complete, starting backup", "Backup complete,
tidying up", "Bugging out, can't find database" and so on. Trouble
is, the listbox with these helpful messages doesn't get displayed
until all of the processes have completed.
I guess I just want the control to come back to the window between
each step, so that I can update the listbox.
Regards,
Ian.
--
Dr Ian M Piper
ianpiper at mac dot com
skype: ianmpiper
--
Where is the wisdom we have lost in knowledge?
Where is the knowledge we have lost in information?
On 28 Feb 2006, at 9:34 am, Ian Piper wrote:
I am writing a program that backs up a big data file from one
volume to another in Windows XP. In the UI I have a listbox that is
supposed to give the user a transcript of the progress. I am doing
this by adding a row to the listbox and then running
listbox.refresh. It is not working the way I would have expected
though. Here is a short snippet that illustrates the problem.
updateMessageList is a method that adds a row to the listbox and
creates a log file entry. checkForSourceDB just checks that the
source database exists and returns true or false. The issue is that
if I write lstTranscript.refresh a number of times only the first
one gets executed. So in the snippet below the listbox only updates
after "proceeding with backup". The listbox then only updates when
the whole backup is finished.
==== snip ====
updateMessageList("Starting backup...")
updateMessageList("Checking for source database C:\FOLDER
\DB.MDB...")
if checkForSourceDB then
updateMessageList("source database exists - proceeding with
backup")
lstTranscript.refresh
updateMessageList("Archiving previous backup...")
lstTranscript.refresh
[...]
==== snip ====
I must be missing something about how to refresh or repaint UI
components when the system is doing something. I tried using
doevents but this seems to be designed for loops (and I am not
using loops anywhere).
Can anyone set me straight here?
One other thing - is there a way to set the mouse cursor to be the
hourglass under Windows. I am using RB5.5.2 on Mac OS X.
Thanks for any help.
Ian.
--
Dr Ian M Piper
ianpiper at mac dot com
skype: ianmpiper
--
Where is the wisdom we have lost in knowledge?
Where is the knowledge we have lost in information?
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
|