-
Notifications
You must be signed in to change notification settings - Fork 7
Description
I tried the latest 0.167.0 with the NatTable example application and notice some issues when trying to edit a cell. The cell editor is closed immediately after opening it.
As NatTable extends Canvas, the implementation of a cell editor basically means to create a new control with NatTable as parent at the matching position, e.g. a Text. Of course there are quite some listeners added to make the cell editor feel as part of the table, e.g. a FocusListener that closes the editor when you click somewhere else than the editor control.
From checking the log output I suppose there is some issue with the focus handling. But I can' really nail it down. This is the relevant log output when clicking on a cell to open an editor:
Win32Window::Create - Created window=00000000000708B2 headless=false
Win32Window::SetChildContent - Complete, child focus set
Win32Window: WM_SETFOCUS - delegating to Flutter child
SET BOUNDS: DartText {} Rectangle {40, 40, 99, 19}
Win32Window::Move - origin=(40,40) size=(99x19)
Win32Window: WM_SIZE
Using port 62973
ws about to send: {"actionId":"Text/1342374939/ClientReady","payload":null,"error":null,"callbackId":null}
ws about to send: {"actionId":"Text/1342374939/Verify/Verify","payload":{"button":null,"character":null,"count":null,"detail":null,"doit":null,"end":null,"gc":null,"height":null,"index":null,"item":null,"keyCode":null,"keyLocation":null,"magnification":null,"rotation":null,"segments":null,"segmentsChars":null,"start":-1,"stateMask":null,"text":"","time":null,"type":null,"widget":null,"width":null,"x":null,"xDirection":null,"y":null,"yDirection":null},"error":null,"callbackId":null}
ClientReady Text/1342374939
will send: ConfigFlags{ctabfolder_visible_controls=false, image_disable_icons_replacement=false, assets_path=null, use_swt_colors=false, use_swt_fonts=false, preserve_icon_colors=false}
send: swt.evolve.properties: {"use_special_dropdown_button":false,"use_swt_fonts":false,"assets_path":null,"ctabfolder_visible_controls":false,"preserve_icon_colors":false,"use_swt_colors":false,"image_disable_icons_replacement":false}
Text/1342374939/Verify/Verify, payload:{"start":-1.0,"text":""}
send: Text/1342374939: {"id":1342374939,"swt":"Text","font":{"fontData":[{"height":9,"locale":"","style":0,"name":"Segoe UI"}]},"style":50331652,"bounds":{"x":40,"y":40,"width":99,"height":19},"background":{"alpha":255,"blue":240,"green":240,"red":240},"selection":{"x":0,"y":14},"message":"","textChars":[],"editable":true,"visible":true,"orientation":33554432,"dragDetect":true,"text":"My wrong event","textLimit":2147483647,"doubleClickEnabled":true,"enabled":true,"foreground":{"alpha":255,"blue":0,"green":0,"red":0},"tabs":8}
ws about to send: {"actionId":"Text/1342374939/Verify/Verify","payload":{"button":null,"character":null,"count":null,"detail":null,"doit":null,"end":null,"gc":null,"height":null,"index":null,"item":null,"keyCode":null,"keyLocation":null,"magnification":null,"rotation":null,"segments":null,"segmentsChars":null,"start":14,"stateMask":null,"text":"","time":null,"type":null,"widget":null,"width":null,"x":null,"xDirection":null,"y":null,"yDirection":null},"error":null,"callbackId":null}
ws about to send: {"actionId":"Text/1342374939/Verify/Verify","payload":{"button":null,"character":null,"count":null,"detail":null,"doit":null,"end":null,"gc":null,"height":null,"index":null,"item":null,"keyCode":null,"keyLocation":null,"magnification":null,"rotation":null,"segments":null,"segmentsChars":null,"start":0,"stateMask":null,"text":"","time":null,"type":null,"widget":null,"width":null,"x":null,"xDirection":null,"y":null,"yDirection":null},"error":null,"callbackId":null}
Text/1342374939/Verify/Verify, payload:{"start":14.0,"text":""}
Text/1342374939/Verify/Verify, payload:{"start":0.0,"text":""}
Text 1342374939 focus changed: hasFocus=false
ws about to send: {"actionId":"Text/1342374939/Focus/FocusOut","payload":null,"error":null,"callbackId":null}
Text/1342374939/Focus/FocusOut, payload:null
Win32Window: WM_DESTROY
Win32Window: WM_NCDESTROY
To try it out, run the NatTable Examples application (JAR) with Evolve instead of SWT on the classpath. Then open an example that supports editing but without images (there is still the issue with image loading), e.g. Tutorial Examples -> Configuration -> Editing -> CrossValidationGridExample. Click on any cell in the rendered table. You will notice some flickering when the editor control is opened and immediately closed again, and you should see the log output from above.