setFocusItem on Disposed GridItem [message #59825] |
Wed, 08 October 2008 11:54  |
Eclipse User |
|
|
|
I am trying to get tabbing to work in a GridTreeViewer.
When I tab though the grid is trying to set focus on a disposed GridItem,
and I get the following stack trace:
java.lang.IllegalArgumentException: Argument not valid
at org.eclipse.nebula.widgets.grid.Grid.setFocusItem(Grid.java: 8000)
at
org.eclipse.nebula.jface.gridviewer.GridViewerEditor.updateF ocusCell(GridViewerEditor.java:91)
at
org.eclipse.jface.viewers.ColumnViewerEditor.activateCellEdi tor(ColumnViewerEditor.java:166)
at
org.eclipse.jface.viewers.ColumnViewerEditor.handleEditorAct ivationEvent(ColumnViewerEditor.java:377)
at
org.eclipse.jface.viewers.ColumnViewer.triggerEditorActivati onEvent(ColumnViewer.java:670)
at
org.eclipse.jface.viewers.ColumnViewerEditor.processTraverse Event(ColumnViewerEditor.java:490)
at
org.eclipse.jface.viewers.ColumnViewerEditor$4.keyTraversed( ColumnViewerEditor.java:219)
I am initializing with the follow settings:
GridViewerEditor.create(this, actSupport,
ColumnViewerEditor.TABBING_HORIZONTAL
| ColumnViewerEditor.TABBING_MOVE_TO_ROW_NEIGHBOR |
ColumnViewerEditor.TABBING_VERTICAL|
ColumnViewerEditor.KEYBOARD_ACTIVATION);
Does anyone have any ideas what I might be doing wrong?
Thanks
|
|
|
|
|
|
|
|
|
|
Re: setFocusItem on Disposed GridItem [message #592480 is a reply to message #59825] |
Wed, 08 October 2008 13:10  |
Eclipse User |
|
|
|
There's a bug in the GridViewerRow implementation IIRC. It's on my
schedule since a long time but I didn't manage to fix it.
Tom
kentusha schrieb:
> I am trying to get tabbing to work in a GridTreeViewer.
>
> When I tab though the grid is trying to set focus on a disposed
> GridItem, and I get the following stack trace:
>
> java.lang.IllegalArgumentException: Argument not valid
> at org.eclipse.nebula.widgets.grid.Grid.setFocusItem(Grid.java: 8000)
> at
> org.eclipse.nebula.jface.gridviewer.GridViewerEditor.updateF ocusCell(GridViewerEditor.java:91)
>
> at
> org.eclipse.jface.viewers.ColumnViewerEditor.activateCellEdi tor(ColumnViewerEditor.java:166)
>
> at
> org.eclipse.jface.viewers.ColumnViewerEditor.handleEditorAct ivationEvent(ColumnViewerEditor.java:377)
>
> at
> org.eclipse.jface.viewers.ColumnViewer.triggerEditorActivati onEvent(ColumnViewer.java:670)
>
> at
> org.eclipse.jface.viewers.ColumnViewerEditor.processTraverse Event(ColumnViewerEditor.java:490)
>
> at
> org.eclipse.jface.viewers.ColumnViewerEditor$4.keyTraversed( ColumnViewerEditor.java:219)
>
>
>
> I am initializing with the follow settings:
> GridViewerEditor.create(this, actSupport,
> ColumnViewerEditor.TABBING_HORIZONTAL
> | ColumnViewerEditor.TABBING_MOVE_TO_ROW_NEIGHBOR |
> ColumnViewerEditor.TABBING_VERTICAL|
> ColumnViewerEditor.KEYBOARD_ACTIVATION);
>
> Does anyone have any ideas what I might be doing wrong?
>
> Thanks
>
--
B e s t S o l u t i o n . at
------------------------------------------------------------ --------
Tom Schindl JFace-Committer
------------------------------------------------------------ --------
|
|
|
|
Re: setFocusItem on Disposed GridItem [message #592507 is a reply to message #59875] |
Thu, 09 October 2008 09:23  |
Eclipse User |
|
|
|
hello,
use below code..
cell will be activated on tab traverse.might be useful
ColumnViewerEditorActivationStrategy actSupport = new
ColumnViewerEditorActivationStrategy(
gridTableViewer) {
protected boolean isEditorActivationEvent(
ColumnViewerEditorActivationEvent event) {
return event.eventType == ColumnViewerEditorActivationEvent.TRAVERSAL
|| event.eventType ==
ColumnViewerEditorActivationEvent.MOUSE_CLICK_SELECTION
|| (event.eventType == ColumnViewerEditorActivationEvent.KEY_PRESSED
&& event.keyCode == SWT.F2)
|| event.eventType == ColumnViewerEditorActivationEvent.PROGRAMMATIC;
}
};
GridViewerEditor.create(gridViewer, actSupport,
ColumnViewerEditor.TABBING_HORIZONTAL
| ColumnViewerEditor.TABBING_MOVE_TO_ROW_NEIGHBOR
| ColumnViewerEditor.TABBING_VERTICAL
| ColumnViewerEditor.KEYBOARD_ACTIVATION);
}
Thanks,
Raghava
|
|
|
|
|
Re: setFocusItem on Disposed GridItem [message #592525 is a reply to message #59989] |
Fri, 10 October 2008 05:09  |
Eclipse User |
|
|
|
As said there's a bug in the GridViewerRow implementation. Could you
please file a bug and attach a snippet I can run without modifications?
Tom
kentusha schrieb:
> by the way I copied your snippet exactly and did a test and i still get
> the error.
>
--
B e s t S o l u t i o n . at
------------------------------------------------------------ --------
Tom Schindl JFace-Committer
------------------------------------------------------------ --------
|
|
|
|
Powered by
FUDForum. Page generated in 0.04884 seconds