Say I have a number $n_{max}$. I want a command to generate a table like
1 1
2 2
3 3
4 4
...
nmax nmax
where the second column is editable, and this table can be evaluated so that Mathematica treats the table as the set
replacement = { 1 -> 1, 2 -> 2, ...}
(The point of this is so that I can replace the original list using /.replacement).
So for example, after generating the table above, I can edit the second column as follows
1 A
2 B
3 C
4 D
...
nmax FF
and this output re-evaluates into set
replacement = { 1-> A, 2-> B, 3-> C, F-> D, ... , nmax-> FF}
Part
.tmp = Transpose[{Range[4], Range[4]}]
.tmp[[All, 2]] = {A, B, C, D}
. But don't use capitalised symbols. $\endgroup$a = RandomInteger[10,{5,2}]; TableView[Dynamic[a]]
. WARNING:TableView
in undocumented, it might not work, and it has already crashed my Mathematica ... save your work before trying! $\endgroup$TableView
changed in V9. It is now aTableViewBox
. Before that it was built from other boxes. $\endgroup$