Problem with checkboxes and menu items in a plugin

Hey folks, having a weird issue that I'm not sure if it's machine specific (don't have multiple machines to test on here!) This is KM v8.2.4 on macOS High Sierra 10.13.6.

I'm writing some plugins, and passing text along seems to work OK, but checkboxes and menus in the macro interface don't... update correctly?

I made an example plugin - just a menu and three checkboxes.

Check a checkbox, run the macro, then check different checkboxes, and if you run it again the results will be the same as the first time you ran it. Run it AGAIN and it'll finally update correctly - just not sure why it takes two macro activations for states to update. Maybe Im doing something wrong somewhere?


Checkbox and Menu Problem (10.6 KB)

How are you running the macro, and how quickly after the change are you running the macro?

There is a slight delay until the macro is saved (you can see the “dirty” flag in the bottom right corner of the editor window), and then also a slight delay after that before the engine loads the new macros.

So if you make a change and then immediately click the Run button or trigger the macro, you will get the results before the change.

I have adjusted the code for the next version to ensure if you click the Run version that the macros are saved and the engine has loaded the current version before running the macro, but if you trigger the macro manually you can still potentially get the old macro from before the change.