commit | 5fdce45fa7483a5e87270ace76e3796f0e1b8116 | [log] [tgz] |
---|---|---|
author | Alexandr Miloslavskiy <alexandr.miloslavskiy@syntevo.com> | Tue Mar 22 05:01:05 2022 +0300 |
committer | Lakshmi P Shanmugam <lshanmug@in.ibm.com> | Fri Mar 25 04:11:46 2022 -0400 |
tree | 11b881d314aececf3058ef69e68a987794ad5952 | |
parent | d9a010930a1e5d8b33824ab350c5492a55139ee2 [diff] |
Bug 456602 - [Cocoa] ArrayIndexOutOfBoundsException in Table._getItem The problem is that item for cached `selectedRowIndex` can be deleted between mouse down (where variable is set) and mouse up (where it's used). I tried to solve the original problem (where macOS sends SWT.Selection after `[NSEvent doubleClickInterval]` from mouse down) but didn't find a way to do that. It seems that there are no settings that could disable double click detection in `-[NSTableView mouseDown:]`. So the workaround has to stay, it seems. I also noticed that macOS cancels pending selection event in `-[NSTableView noteNumberOfRowsChanged]`. SWT already calls that whenever number of items changes (item is deleted or added). I was thinking to reset `selectedRowIndex` in it, but then I wasn't sure if it's the right thing to do if for example an item is added at the end - surely this doesn't prevent from proceeding with handling click on the old item? I the end, I decided to not overcomplicate things and just fix the crash without affecting anything else. Change-Id: I42cb381d408d105e4df6372a2d69967b9b274a9a Signed-off-by: Alexandr Miloslavskiy <alexandr.miloslavskiy@syntevo.com> Reviewed-on: https://git.eclipse.org/r/c/platform/eclipse.platform.swt/+/192115 Tested-by: Platform Bot <platform-bot@eclipse.org> Tested-by: Lakshmi P Shanmugam <lshanmug@in.ibm.com> Reviewed-by: Lakshmi P Shanmugam <lshanmug@in.ibm.com>
Thanks for your interest in this project.
See the following description for how to contribute a feature or a bug fix to SWT.
Information regarding source code management, builds, coding standards, and more and be found under the following link.
Before your contribution can be accepted by the project, you need to create and electronically sign the Eclipse Foundation Contributor License Agreement (CLA).
Contact the project developers via the project's “dev” list.
This project uses Bugzilla to track ongoing development and issues.
Be sure to search for existing bugs before you create another one. Remember that contributions are always welcome!