For long running actions, it would be helpful to have a built-in way to disable components while their event is processed. For example, currently the user could press a button multiple times while the first long running action is happening creating successive events using the same selections on the GUI.
I have used the following workaround for a button (which can be extended for other components/paradigms):
Use a timer to continually call MarkDirty() on the button, then on the button click event run a long running action in a goroutine (which will return immediately). Calls to SetEnabled() within the goroutine will be updated as quickly as the timer repeats..
For long running actions, it would be helpful to have a built-in way to disable components while their event is processed. For example, currently the user could press a button multiple times while the first long running action is happening creating successive events using the same selections on the GUI.
I have used the following workaround for a button (which can be extended for other components/paradigms):
Use a timer to continually call MarkDirty() on the button, then on the button click event run a long running action in a goroutine (which will return immediately). Calls to SetEnabled() within the goroutine will be updated as quickly as the timer repeats..