Best way of removing data from a virtual TableViewer [message #330712] |
Mon, 11 August 2008 14:03  |
Eclipse User |
|
|
|
Hi,
I have a TableViewer based on a SWT.VIRTUAL table, and need to remove an
object from the viewer.
What I do is:
1) remove stuff from my custom content provider
2) notify the viewer: myViewer.remove(selectedObject)
But it doesn't always refresh ok the data.
I have tried also this:
1) notify the viewer: myViewer.remove(selectedObject)
2) remove stuff from my custom content provider
and this:
1) remove stuff from my custom content provider
2) notify the table: myViewer.getTable().remove(selectedObjectIndex)
and this:
1) notify the table: myViewer.getTable().remove(selectedObjectIndex)
2) remove stuff from my custom content provider
all of them unsuccessfully. :-(
What's the right way of do it.
Thanks in advance for any help.
|
|
|
Re: Best way of removing data from a virtual TableViewer [message #330713 is a reply to message #330712] |
Mon, 11 August 2008 14:26   |
Eclipse User |
|
|
|
Hi,
This is a know issue.
https://bugs.eclipse.org/bugs/show_bug.cgi?id=144280
https://bugs.eclipse.org/bugs/show_bug.cgi?id=235983
Never directly interface with the control this will break everything!
Tom
David Perez schrieb:
> Hi,
>
> I have a TableViewer based on a SWT.VIRTUAL table, and need to remove an
> object from the viewer.
>
> What I do is:
>
> 1) remove stuff from my custom content provider
> 2) notify the viewer: myViewer.remove(selectedObject)
>
> But it doesn't always refresh ok the data.
>
> I have tried also this:
>
> 1) notify the viewer: myViewer.remove(selectedObject)
> 2) remove stuff from my custom content provider
>
> and this:
>
> 1) remove stuff from my custom content provider
> 2) notify the table: myViewer.getTable().remove(selectedObjectIndex)
>
> and this:
>
> 1) notify the table: myViewer.getTable().remove(selectedObjectIndex)
> 2) remove stuff from my custom content provider
>
> all of them unsuccessfully. :-(
>
> What's the right way of do it.
> Thanks in advance for any help.
>
--
B e s t S o l u t i o n . at
------------------------------------------------------------ --------
Tom Schindl JFace-Committer
------------------------------------------------------------ --------
|
|
|
Re: Best way of removing data from a virtual TableViewer [message #330790 is a reply to message #330713] |
Wed, 13 August 2008 14:03  |
Eclipse User |
|
|
|
Thanks Tom!
Let's hope it gets fixed not too late.
The TableViewer is a very basic component, used everywhere.
Tom Schindl wrote:
> Hi,
> This is a know issue.
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=144280
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=235983
> Never directly interface with the control this will break everything!
> Tom
> David Perez schrieb:
>> Hi,
>>
>> I have a TableViewer based on a SWT.VIRTUAL table, and need to remove an
>> object from the viewer.
>>
>> What I do is:
>>
>> 1) remove stuff from my custom content provider
>> 2) notify the viewer: myViewer.remove(selectedObject)
>>
>> But it doesn't always refresh ok the data.
>>
>> I have tried also this:
>>
>> 1) notify the viewer: myViewer.remove(selectedObject)
>> 2) remove stuff from my custom content provider
>>
>> and this:
>>
>> 1) remove stuff from my custom content provider
>> 2) notify the table: myViewer.getTable().remove(selectedObjectIndex)
>>
>> and this:
>>
>> 1) notify the table: myViewer.getTable().remove(selectedObjectIndex)
>> 2) remove stuff from my custom content provider
>>
>> all of them unsuccessfully. :-(
>>
>> What's the right way of do it.
>> Thanks in advance for any help.
|
|
|
Powered by
FUDForum. Page generated in 0.02944 seconds