[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.platform.swt] Re: SWT 3.3's TableViewer cannot work properly as SWT 3.2's

mwu schrieb:
Hi,
Is there any striction added if I try to make TableViewer editable in Eclipse 3.3? In Eclipse3.2, I write my tableViwer like this:


tableViewer.setInput(inputList);
tableViewer.setCellEditors(editors);
tableViewer.setCellModifier(cellModifier);

It works ok, I can edit my tableViewer.But when I upgrade my Eclipse into 3.3. The tableViewer cannot be editable anymore.And I found in TableViewer's activateCellEditor method, its part.getEditingSupport is null,so the editor action cannot be activated at all.But if I change the sequence of above code like this, it can work then:

tableViewer.setCellEditors(editors);
tableViewer.setCellModifier(cellModifier);
tableViewer.setInput(inputList);

The question is why does this changes? Is it neccessary that we should firstly set cell editor, then we can set input object?


Thanks
Mingxia




See https://bugs.eclipse.org/bugs/show_bug.cgi?id=160700 and the patch attached to it.


Tom