|
Re: swt.widgets.Text error when append [message #664528 is a reply to message #664386] |
Sun, 10 April 2011 21:12 |
|
Hi Peter,
Invalid thread access means that you access a widget method from a thread
that is not the UIThread of this widget's display. If you call asyncExec
() on another session's display, you will also get this exception. You
should therefore replace Display.getDefault() with receivedText.getDisplay
().
And you should always prefer asyncExec() over syncExec() unless you have
a very good reason to use the latter.
HTH, Ralf
--
Ralf Sternberg
Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/
Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
|
|
|
|
|
|
Re: swt.widgets.Text error when append [message #664604 is a reply to message #664595] |
Mon, 11 April 2011 11:04 |
Ivan Furnadjiev Messages: 2426 Registered: July 2009 Location: Sofia, Bulgaria |
Senior Member |
|
|
Hi Peter,
we have this bug opened:
319227: [Text] Multi text does not auto-scroll on append, insert operation
https://bugs.eclipse.org/bugs/show_bug.cgi?id=319227
but, it's hard (or even impossible) to fix it with current client side
implementation.
The only way (currently) to scroll to the end is to call setText with
the complete text. Of course, this will lead to performance problems
with really large texts - like in your case, append to the log and set
the complete log. Maybe a console with last events/logs on the top
(instead of the bottom) will solve your problem - no need for scrolling.
HTH,
Ivan
On 4/11/2011 1:20 PM, Peter Boccia wrote:
> Thank you Ralf!
> It works but in RAP it does NOT scroll automatically at the end of the
> text? I just read a bug of this issue, it's dated July 2010, but no
> one fixed it.
> How can I auto-scroll to the end?
> I try putting a personal ScrollBar but it doesn't work.
>
> Thank you.
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03480 seconds