Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Tableviewer reset(how to reset a tableviewer)
Tableviewer reset [message #641011] Tue, 23 November 2010 20:54 Go to next message
fran81 Missing name is currently offline fran81 Missing nameFriend
Messages: 27
Registered: November 2010
Junior Member
Hello,

I would like to reset the content of a tableviewer and display new data.
However the size of my input changes at every update (the n. of columns/row changes).

So when I try to refresh the tableviewer I get an assertion failed error, and the error "column x has no label provider"

How should I approach this problem?

THanks
Re: Tableviewer reset [message #641080 is a reply to message #641011] Wed, 24 November 2010 08:30 Go to previous messageGo to next message
Daniel Krügler is currently offline Daniel KrüglerFriend
Messages: 853
Registered: July 2009
Senior Member
On 11/23/2010 21:54, fran81 wrote:
> Hello,
>
> I would like to reset the content of a tableviewer and display new data.
> However the size of my input changes at every update (the n. of
> columns/row changes).
>
> So when I try to refresh the tableviewer I get an assertion failed
> error, and the error "column x has no label provider"
>
> How should I approach this problem?

We probably need your code to see that. Refreshing the Viewer with
changing rows and columns should not cause problems. I assume the
problem is that you have registered column-specific label providers and
you forgot to dispose your original table columns and add the new table
column set (including cell label providers etc.) before refreshing.

HTH & Greetings from Bremen,

Daniel Krügler
Re: Tableviewer reset [message #641829 is a reply to message #641080] Sun, 28 November 2010 15:15 Go to previous message
fran81 Missing name is currently offline fran81 Missing nameFriend
Messages: 27
Registered: November 2010
Junior Member
Thank you Daniel, that was exactly the problem I had.

i've added a dispose for each column created and now it works.
The other thing I had to change was setting the labelprovider before the contentprovider for the whole table.
Previous Topic:Browser execute() mechanism kills existing JS
Next Topic:Table/Tree Item SWT.MeasureItem listener
Goto Forum:
  


Current Time: Tue Apr 16 22:40:21 GMT 2024

Powered by FUDForum. Page generated in 1.40036 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top