Results 1 to 1 of 1
- 08-02-2010, 09:49 PM #1Member
- Join Date
- Aug 2010
- Rep Power
Problem diposing columns in a TableViewer
I have a problem with removing the columns from a TableViewer. I have an RCP app that has an IViewPart. The ViewPart is listening for the partClosed event from a specific editor. When that happens, the part needs to clear it's TableViewer and show a blank 1 column table.
However, it doesn't seem to be working and I have two issues:
1. if I grab the TableColumn array from the table (viewer.getTable().getColumns() ) and I iterate over that array going forward (form 0 to the end), I get an IndexOutOfBoundsException on the second index(1) even though I know the array is 4. Oddly, if I iterate backwards, it can traverse all 4 columns without issue (i.e., starting with index 3 and going to 0).
2. However, it never deletes the first column's data. The header is wiped out, but the data remains.
Has anyone ever seen this and if so how did they resolve it? I can't seem to figure out why I can't iterate from 0 to n but I can go from n to 0. That suggests I've done something odd or weird.
- By malcomtom in forum SWT / JFaceReplies: 0Last Post: 06-19-2010, 02:04 PM
- By Shikhar in forum SWT / JFaceReplies: 0Last Post: 06-17-2010, 09:31 AM
- By png in forum AWT / SwingReplies: 1Last Post: 06-07-2010, 08:10 AM
- By mrshawnwu in forum SWT / JFaceReplies: 0Last Post: 04-15-2010, 07:37 PM
- By BogdanNb in forum SWT / JFaceReplies: 0Last Post: 07-09-2008, 01:54 PM