I would like to trigger a long calculation inside a dynamic module with a Button. It seems that the evaluation stops without an error-message after some seconds. I made a test outside the a dynamic module:
Clear[res]
Button["run", res = Total[Table[i; Pause[1], {i, 1, 3}]]]
After pressing the button, the result is: 3 Null
Ok but if the calculation takes 6 seconds
Clear[res]
Button["run", res = Total[Table[i; Pause[1], {i, 1, 6}]]]
Then res is not assigned.
Why does it happen and how can it be avoided, also inside a DynamicModule. I would like something like this:
Button to start a simulation run
Another Button which does some analysis on the simulation results