Someone know why this Button
works when clicked:
testModule1[]:=DynamicModule[{button, x="",randomGrid},
button=Button["Create table",x=RandomInteger[10,{3,3}]//MatrixForm];
Deploy@Panel@Dynamic@Column[{button,x}]
]
testModule1[]
and this not:
testModule2[]:=DynamicModule[{button, x="",randomGrid,ff},
ff:=(x=RandomInteger[10,{3,3}]//MatrixForm);
button=Button["Create table",ff];
Deploy@Panel@Dynamic@Column[{button,x}]
]
testModule2[]
I have some big functions to put into x
, and I would like to organize my code in the second way.