Refreshing the window is interacting with the GUI.

Charles Yeomans

On Apr 4, 2007, at 3:03 PM, Daniel Stenning wrote:

> Agreed. But in this case the user can not interact with the app  
> while the
> process is running anyway except to cancel the process. Were there  
> a need to
> interact with the GUI in parallel with the process ( apat from just
> canceling the task ) then all the suggestions make sense, but not  
> for a task
> that basically you set going and leave alone ( or go off and switch to
> another app - say a browse or email app while waiting )
>
> The thing that gets me is that this only seems to have become an  
> issue in
> the latest few releases. I never used to have to keep tickling the  
> app like
> this. I suspect something even loop wise isnt quite right  or has been
> changed,
>
>
> On 4/4/07 19:41, "Tim Hare" <[EMAIL PROTECTED]> wrote:
>
>> 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>

Reply via email to