Skip to main content



      Home
Home » Eclipse Projects » NatTable » Doubleclick from a NatTable doesn't work with MacOS
Doubleclick from a NatTable doesn't work with MacOS [message #1716321] Wed, 02 December 2015 19:40 Go to next message
Eclipse UserFriend
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 #1716324 is a reply to message #1716321] Wed, 02 December 2015 22:39 Go to previous messageGo to next message
Eclipse UserFriend
I haven't heard of that before. So no there is no solution for it, because that issue is not known. Wink

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.
Re: Doubleclick from a NatTable doesn't work with MacOS [message #1716440 is a reply to message #1716324] Thu, 03 December 2015 15:33 Go to previous messageGo to next message
Eclipse UserFriend
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.
Re: Doubleclick from a NatTable doesn't work with MacOS [message #1716453 is a reply to message #1716440] Thu, 03 December 2015 22:01 Go to previous messageGo to next message
Eclipse UserFriend
Which version of NatTable? It sounds like an issue we have fixed a while ago.

What you explain sounds like you are moving the mouse slightly on double click. This way it becomes a drag instead of a double click.
Re: Doubleclick from a NatTable doesn't work with MacOS [message #1716565 is a reply to message #1716453] Fri, 04 December 2015 15:34 Go to previous messageGo to next message
Eclipse UserFriend
I'm using NatTable v1.3.0.201503261201.
Maybe it has to do with Bug #436770 or #379884? They both are fixed, but the descriptions sound like the given error. I'll try to narrow down to the code.
Re: Doubleclick from a NatTable doesn't work with MacOS [message #1716568 is a reply to message #1716565] Fri, 04 December 2015 16:40 Go to previous messageGo to next message
Eclipse UserFriend
Could you also give the current 1.4 snapshot a try?
Re: Doubleclick from a NatTable doesn't work with MacOS [message #1716592 is a reply to message #1716568] Sat, 05 December 2015 15:09 Go to previous messageGo to next message
Eclipse UserFriend
Am 04.12.2015 um 22:40 schrieb Dirk Fauth:
> Could you also give the current 1.4 snapshot a try?

Hi Dirk,
I've checked it with the latest snapshot (Build 454). The same effect. I
assume that switching back to "normal" mode causes this error. The mouse
doesn't move between the two clicks. I'll check it in more detail. Under
Windows I don't have these problems...

Regards,
Ralf.
Re: Doubleclick from a NatTable doesn't work with MacOS [message #1730709 is a reply to message #1716592] Wed, 27 April 2016 17:06 Go to previous messageGo to next message
Eclipse UserFriend
So, now I've checked it again (using master branch) with the same error. I've adapted the _001_Getting_Started example, so you can just copy the attached file into org.eclipse.nebula.widgets.nattable/org.eclipse.nebula.widgets.nattable.examples/src/org/eclipse/nebula/widgets/nattable/examples/examples and launch it as Java Application. On Windows OS you see a message dialog if you doubleclick at a row. On Mac OS there happens nothing. As Dirk stated it depends on MouseModeEventHandler, but at the moment I've no idea how I can fix it. Would be glad if someone could help me. If you want I can file a Bug.

Regards,
Ralf.
Re: Doubleclick from a NatTable doesn't work with MacOS [message #1730724 is a reply to message #1730709] Wed, 27 April 2016 23:56 Go to previous messageGo to next message
Eclipse UserFriend
Yes please open a ticket. I don't have a Mac so I'm not able to test and see what is causing this. But maybe we can get some help somewhere.
Re: Doubleclick from a NatTable doesn't work with MacOS [message #1730819 is a reply to message #1730724] Thu, 28 April 2016 13:29 Go to previous message
Eclipse UserFriend
Done (Bug 492680).

[Updated on: Thu, 28 April 2016 13:29] by Moderator

Previous Topic:getConfigLabelsByPosition
Next Topic:default column size issue
Goto Forum:
  


Current Time: Sun Jun 22 08:17:20 EDT 2025

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

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

Back to the top