Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-swt-dev] StyledText and keyboard actions

On 3 Feb 2017, at 13:50, Thomas Singer <ts-swt@xxxxxxxxxxx> wrote:

Event verifyEvent = new Event();
...
verifyEvent.doit = event.doit;
notifyListeners(ST.VerifyKey, verifyEvent);
if (verifyEvent.doit) {

The problem is that if the VerifyKey-listener has set verifyEvent.doit to false, this change is NOT propageted to the KeyDown listener, so if there is one more KeyDown listener, it will not know whether the event already has been processed. Looks like a bug to me.

Can you explain why? Maybe it helps explaining what you are trying to implement. As for the documented contract it seems correct. A VerifyKeyListener can block an event from being handled. If doit is false then other key down listeners should not be informed.

Thank you for the suggestion. In what repository I can find the AbstractTextEditor (I'm only used to SWT)? Thanks in advance.

It's here:

-Gunnar

-- 


Back to the top