-
Settings "Ok" pressed
I'm working on a plugin. Is there an event for the "Ok" button being pressed?
I am currently saving the settings using the onChanged event handler. This is alright, but I would prefer only to save them when the ok is pressed (leaving "Back" as a cancel).
My problem is that if I save them after every change, I also have to re-initialize everything on every save. Because I couldn't find a callback for the settings screen dismissed/disposed.
I am working with Com Ports, and doing it this way causes my code to try and connect to each com port as I scroll through the list. Giving me access denied errors on some of them if they are in use. I would like to be able to scroll through them to the one I want, and then save it. Allowing my plugin to only initialize the correct com port.
-
Unfortunately in 0.8, the OK button just executes the GoBack function making it impossible to detect whether ok or back was pressed.
You could listen for the GoBack event though and only re-initialize everything if the settings have changed and the ok or back button is pushed.