Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Nebula » setFocusItem on Disposed GridItem
setFocusItem on Disposed GridItem [message #59825] Wed, 08 October 2008 15:54 Go to next message
kent gibson is currently offline kent gibsonFriend
Messages: 114
Registered: July 2009
Senior Member
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 #59851 is a reply to message #59825] Wed, 08 October 2008 17:10 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
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 #59875 is a reply to message #59851] Thu, 09 October 2008 08:27 Go to previous messageGo to next message
kent gibson is currently offline kent gibsonFriend
Messages: 114
Registered: July 2009
Senior Member
is there any possible workaround?
Re: setFocusItem on Disposed GridItem [message #59943 is a reply to message #59875] Thu, 09 October 2008 13:23 Go to previous messageGo to next message
Raghava Rao is currently offline Raghava RaoFriend
Messages: 87
Registered: July 2009
Member
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 #59967 is a reply to message #59943] Thu, 09 October 2008 15:17 Go to previous messageGo to next message
kent gibson is currently offline kent gibsonFriend
Messages: 114
Registered: July 2009
Senior Member
thanks, however that is pretty much what I am doing. The tab works
sometimes, but if I explicitly select into a cell and then tab, then I get
the error as described.
Re: setFocusItem on Disposed GridItem [message #59989 is a reply to message #59967] Thu, 09 October 2008 15:22 Go to previous messageGo to next message
kent gibson is currently offline kent gibsonFriend
Messages: 114
Registered: July 2009
Senior Member
by the way I copied your snippet exactly and did a test and i still get
the error.
Re: setFocusItem on Disposed GridItem [message #60010 is a reply to message #59989] Fri, 10 October 2008 09:09 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
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
------------------------------------------------------------ --------
Re: setFocusItem on Disposed GridItem [message #60057 is a reply to message #60010] Fri, 10 October 2008 14:21 Go to previous message
kent gibson is currently offline kent gibsonFriend
Messages: 114
Registered: July 2009
Senior Member
will do, thanks.
Re: setFocusItem on Disposed GridItem [message #592480 is a reply to message #59825] Wed, 08 October 2008 17:10 Go to previous message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
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 #592487 is a reply to message #59851] Thu, 09 October 2008 08:27 Go to previous message
kent gibson is currently offline kent gibsonFriend
Messages: 114
Registered: July 2009
Senior Member
is there any possible workaround?
Re: setFocusItem on Disposed GridItem [message #592507 is a reply to message #59875] Thu, 09 October 2008 13:23 Go to previous message
Raghava Rao is currently offline Raghava RaoFriend
Messages: 87
Registered: July 2009
Member
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 #592513 is a reply to message #59943] Thu, 09 October 2008 15:17 Go to previous message
kent gibson is currently offline kent gibsonFriend
Messages: 114
Registered: July 2009
Senior Member
thanks, however that is pretty much what I am doing. The tab works
sometimes, but if I explicitly select into a cell and then tab, then I get
the error as described.
Re: setFocusItem on Disposed GridItem [message #592521 is a reply to message #59967] Thu, 09 October 2008 15:22 Go to previous message
kent gibson is currently offline kent gibsonFriend
Messages: 114
Registered: July 2009
Senior Member
by the way I copied your snippet exactly and did a test and i still get
the error.
Re: setFocusItem on Disposed GridItem [message #592525 is a reply to message #59989] Fri, 10 October 2008 09:09 Go to previous message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
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
------------------------------------------------------------ --------
Re: setFocusItem on Disposed GridItem [message #592544 is a reply to message #60010] Fri, 10 October 2008 14:21 Go to previous message
kent gibson is currently offline kent gibsonFriend
Messages: 114
Registered: July 2009
Senior Member
will do, thanks.
Previous Topic:setFocusItem on Disposed GridItem
Next Topic:[Gantt] Workaround for scrollbars
Goto Forum:
  


Current Time: Fri Apr 26 14:23:19 GMT 2024

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

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

Back to the top