Consider this (edit: Pause[3]
represents some long computation the button should do):
Manipulate[Dynamic@output, Button["do",
output = "Paused..."; FinishDynamic[]; Pause[3]; output = "done"]]
This works in that we see the Paused message briefly. But it uses a global variable output
.
1) If you take out the FinishDynamic[]
, or the first Dynamic@
it does not work.
2) If you add a {output,ControlType->None}
to the Manipulate
, it does not work.
3) Similarly for wrapping it all within a DynamicModule[{output},]
Is there a better way to update the output of a Manipulate
from within a Button
? I'd like to avoid eg Refresh
every second since the recalculation will in principle happen very rarely.