You shouldn't need DoEvents to get the screen to update.  A control.Refresh
or window.UpdateNow should handle that part of it.  The real problem will be
that your app will become "unresponsive" during the long process.  That's
why you use need a thread, because there actually *are* 2 things going on:
your process and the UI.

Tim


> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Behalf Of
> Daniel Stenning
> Sent: Wednesday, April 04, 2007 11:23 AM
> To: REALbasic NUG <[email protected]>
> Subject: Re: RB App requires constant "tickling" and switching
> toforeground in order for it to keep running
>
>
> It does seem to me a little "overkill" to have to write the code
> to spawn an
> extra thread just to handle what is essentially a single threaded
> task that
> merely needs to update the screen once in a while  ( if that is what your
> article proposes ). Its not as my app needs to be running several
> processes
> at once.
>
>
> On 4/4/07 19:10, "Charles Yeomans" <[EMAIL PROTECTED]> wrote:
>
> > In the upcoming issue of RBD my column explains how to do this sort
> > of thing correctly using threads.
> >
> > Charles Yeomans
> >
> > On Apr 4, 2007, at 2:00 PM, Daniel Stenning wrote:
> >
> >> Its a long non visual process which uses a progress bar and text
> >> control to
> >> keep the user aware of ongoing status.  I have an idea it is linked to
> >> DoEvents which gets called in order to redraw the window. I am
> >> going to try
> >> replacing them all with the Window.UpdateNow() method  when I get a
> >> chance.
> >>
> >> I am sure that this wasn't such a problem in prior releases ( the
> >> last one I
> >> have been using is 2006R4 )
> >>
> >>
> >> On 4/4/07 18:32, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> >>
> >>> On Apr 04, 2007, at 17:15 UTC, Daniel Stenning wrote:
> >>>
> >>>> I am getting a situation where my RB app  ( in RB2007R2 ) seems
> >>>> to go
> >>>> to sleep
> >>>> and stop its processing,  whenever it is not in the foreground and I
> >>>> turn my back.  Only clicking a control like a listbox wakes it up.
> >>>
> >>> I've seen such things happen ages ago on Powerbooks that would cycle
> >>> down the processor speed if they thought nothing was going on.
> >>> But I'm
> >>> not sure that's what you're seeing here.  What sort of processing
> >>> is it
> >>> doing, and how is it doing it (e.g. thread, timer, or what)?
> >>>
> >>> Best,
> >>> - Joe
> >>>
> >
> > _______________________________________________
> > Unsubscribe or switch delivery mode:
> > <http://www.realsoftware.com/support/listmanager/>
> >
> > Search the archives:
> > <http://support.realsoftware.com/listarchives/lists.html>
> >
>
> Regards,
>
> Dan
>
>
>
> _______________________________________________
> Unsubscribe or switch delivery mode:
> <http://www.realsoftware.com/support/listmanager/>
>
> Search the archives:
> <http://support.realsoftware.com/listarchives/lists.html>
>
> --
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.5.446 / Virus Database: 268.18.25/745 - Release Date:
> 4/3/2007 12:48 PM
>
--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.446 / Virus Database: 268.18.25/745 - Release Date: 4/3/2007
12:48 PM

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to