Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-swt-dev] How to refresh a control in another thread?

I see, thank you very much:-)

ÔÚÄúµÄÀ´ÐÅÖÐÔø¾­Ìáµ½:
>From:Jared Burns <jared-eclipse@xxxxxxxxx>
>Reply-To: platform-swt-dev@xxxxxxxxxxx
>To: platform-swt-dev@xxxxxxxxxxx
>Subject: Re: [platform-swt-dev] How to refresh a control in another thread?
>
>This is a frequently asked question which should be asked on the newsgroup 
>(the place for user questions).
>
>The answer is that you should post your code to the UI thread using 
>Display.asynchExec(Runnable) or Display.synchExec(Runnable). See the Eclipse 
>codebase for examples.
>
>- Jared
>
>On Friday 23 August 2002 12:24 pm, you wrote:
>> Hi,
>>    In my application, the main thread creats the UI, and another thread
>> collects data that should be showed in UI.
>>    I want to refresh the UI when collecting is completed, but when I called
>> SomeControl.refreshUI(), I got a "thread invalid access" exception. I saw
>> the source of SWT, and found that Display check whether current thread is
>> the thread created UI.
>>    My qustion is, how can I refresh the control which created by main
>> thread in another thread?
>>    Thanks
>>
>>
>> _______________________________________________
>> platform-swt-dev mailing list
>> platform-swt-dev@xxxxxxxxxxx
>> http://dev.eclipse.org/mailman/listinfo/platform-swt-dev
>_______________________________________________
>platform-swt-dev mailing list
>platform-swt-dev@xxxxxxxxxxx
>http://dev.eclipse.org/mailman/listinfo/platform-swt-dev
>




Back to the top