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:How associate a combo in a TableItem in a Table
Next Topic:RCP product crashes on Mac OS X 10.5.8 with JVM HotSpot 1.6.0_22 64 Bit
Goto Forum:
  


Current Time: Sun Oct 22 21:22:13 GMT 2017

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

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