Doubleclick from a NatTable doesn't work with MacOS [message #1716321] |
Wed, 02 December 2015 19:40  |
Eclipse User |
|
|
|
Hi all,
my application (pure E4) has a NatTable view which works correctly under
Windows. Now, if I try to run it under MacOS (Yosemite), the application
starts and the table is displayed, but the doubleclick has no effect. I
configure it as follows:
protected void hookDoubleClickCommand(final NatTable nattable, final
EntityGridListLayer<T> gridLayer) {
// Add a double click listener
nattable.getUiBindingRegistry().registerDoubleClickBinding(MouseEventMatcher.bodyLeftClick(SWT.NONE),
new IMouseAction() {
@Override
public void run(NatTable natTable, MouseEvent event) {
//get the row position for the click in the NatTable
int rowPos = natTable.getRowPositionByY(event.y);
... some other stuff ...
}
}
The code isn't called. Is there a solution for it?
TIA,
Ralf
[Updated on: Wed, 23 March 2016 09:09] by Moderator
|
|
|
|
Re: Doubleclick from a NatTable doesn't work with MacOS [message #1716440 is a reply to message #1716324] |
Thu, 03 December 2015 15:33   |
Eclipse User |
|
|
|
Am 03.12.2015 um 04:39 schrieb Dirk Fauth:
> I haven't heard of that before. So no there is no solution for it,
> because that issue is not known. ;)
>
> Honestly I don't understand why it doesn't work on Mac. I think mouse
> clicks are treated the same on any operating system. You might want to
> debug into MouseModeEventHandler and check why the clicks are not
> handled correctly.
Ok, it seems to be a race condition. I've configured the mouse wheel to
fire a double click. If I use it the DoubleClick event is fired from
NatTable and all things are ok.
Now, if I click twice (i.e., make a double click "manually"), a new
DoubleClick event is generated from SWT. But now, the handler which
handles this event is NOT the MouseModeEventHandler, but the
DragModeEventHandler. I.e., the DoubleClick event is "stolen" by the
DragModeEventHandler! It's a bit crazy to explain...
How can I "force" the MouseModeEventHandler to handle my DoubleClick event?
Btw, the Mac runs in a VM (don't know if it's important). Any hints are
welcome.
TIA,
Ralf.
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.29477 seconds