Bug introduced in 10.4 or earlier and persisting through 11.1.1
CASE:3892974
Thanks for bringing this to our attention. A report has been filed with the developers.
I can track changes to a list with Dynamic
without too much difficulty
foolist = {};
Dynamic[foolist]
And if I were to append an element to foolist
, the dynamic expression will refresh to {list}
AppendTo[foolist, list]
But when I do the same with an association,
foobar = <||>;
Dynamic[foobar]
And add a new entry to it
AssociateTo[foobar, foo->bar]
The dynamic expression won't be able to capture the change. Am I doing something wrong?
AppendTo[foobar, foo -> bar]
and it will work well. $\endgroup$Set
assignments to an association can be tracked as well $\endgroup$