I am using Extended Script to create a dialog in InDesign. I’m reading data from a .csv file to get a list of names and for each name, checkboxes are created to let the user decide on some options in regard to each name before continuing with the script. Everything works perfectly fine in regard to the script, including the user’s choices with the options.
However, given that all that clicking to check or uncheck checkboxes can be time-consuming and annoying, I would like to add buttons to my dialog that allow for toggling of all the checkboxes used for the same option for each name. I got the toggling logic done and it works like I want it to (which I know from the one version of this that works, see below) but I cannot get the dialog to actually show the changes made.
When the user presses a button to toggle some checkbox groups, nothing happens. I use .update() on the dialog but that doesn’t seem to do anything.
Besides .update() on the dialog, I have also tried other options such as moving the dialog, disabling and enabling it again, removing the checkboxes and adding them again etc. but nothing has worked so far. The only way I got it all to work (and why I know the toggling logic as such is working) has been to actually fully close the dialog and then open it right away again with the changes applies. However, this does seem very unsatisfactory and prone to errors/bugs; when one clicks too fast, it crashes and even if one clicks slowly, the disappearing and reappearing of the dialog is not pleasant to the eyes.
If anyone has any ideas on how to refresh the dialog to get it to actually show the changes to the checkbox values, I would be very grateful. Thank you.