While trying to use the ChoiceDialog function to populate an association, I have run into an interesting issue...
ass=<||>;
ChoiceDialog["which", {"a" -> AssociateTo[ass, "aa" -> "a"],
"b" -> AssociateTo[ass, "bb" -> "b"],
AssociateTo[ass, "c" -> "cc"]}]
After running, and only selecting one option, such as "a" in the choicedialog window, it properly prints out
<|aa->a|>
But then upon re-calling the association ass, which was not previously populated with anything, now all values have been added to it:
ass
yields
<|"aa" -> "a", "bb" -> "b", "c" -> "cc"|>
Why are all values that were placed in the Dialog box being added, and not only the value which I have selected?