I think I have different vision about what the problem is.
It looks like the reason is not because the HoldFirst
attribute of Dynamic
but rather because of Slider
itself.
Slider does not response to Hold
functions and all Hold
Attributes
.
In all of these example, Hold does not work:
Hold[Slider[Dynamic[x]]]
HoldComplete[Slider[Dynamic[x]]
Dynamic[x]
In the above mentioned case of Table
, Table
has attribute HoldAll
. But this does not work with Slider
.
a = {.1, .5, .3, .9, .2};
Table[Slider[Dynamic[data[[i]]]], {i, 2}]//Trace
As you can see that Table
does not hold its argument.
Now check this:
Slider[Dynamic[x]]
Table[Dynamic[x + i], {i, 5}]
It looks like the Dynamic
HoldFirst
is not the reason for this issue but it is the Slider
itself evaluate inside any Hold
.