Community
Participate
Working Groups
Created attachment 221074 [details] Code demonstrating the problem See the attached sample code. I want to call the method userSelectedSomething when the user picks an entry from the combo's drop-down list. This is easily accomplished with addSelectionChangedListener. I want to call the method userTypedOrOtherwiseEditedText exactly when the user has typed into the combo or used the right-click cut/paste/delete options to modify the text. This seems to be impossible. The closest I can get is listening to SWT.Modify events, but these are also triggered when a selection is made from the list. Listening to SWT.KeyUp, plus treating the next modify event after the right-click menu has been opened as a user edit, gets me 90% of the way there, but is still wrong if the user raises and dismisses the right-click menu without using cut, paste or delete. Please can an event for text edits be added. (See http://stackoverflow.com/questions/12410636/swt-differentiating-between-selection-and-typing-in-a-combo for background)
(In reply to comment #0) > Listening to SWT.KeyUp, plus treating the next modify event after the > right-click menu has been opened as a user edit, gets me 90% of the way > there, but is still wrong if the user raises and dismisses the right-click > menu without using cut, paste or delete. This is actually broken in other ways too: if the user selects items from the list with the up/down arrow keys, the KeyUp listener incorrectly fires the userTypedOrOtherwiseEditedText method.
Do you have an SWT snippet (no JFace) to reproduce this issue?
(In reply to Eric Williams from comment #2) > Do you have an SWT snippet (no JFace) to reproduce this issue? No response in awhile, closing this ticket. Please reopen if able to provide a pure SWT snippet to reproduce the issue with.