Hi guys,
I have in my application a button that when it is pressed, runs a long running task (usually takes a couple of seconds....).
My problem is that while the task runs, I want to stop the button from receiving clicks. Unfortunately this is something I have not achieved.
I have tried creating a new
thread and calling the long running method, and using the Display.geCurrent().asyncExec...
Examples of what I have tried so far:
Additionally tried like that:
In both cases, while the button is disabled and the cursor busy, if the user clicks the button, the long running method is ran several times - and this is what I want to avoid.
I am stuck in one of those "WTF?" situations. I really appreciate your help