Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

6
  • $\begingroup$ I'm trying to understand your first one. The Pause was just to represent some long computation. Where would I put the bulk of such code in your example? $\endgroup$ Commented Feb 20, 2015 at 3:10
  • $\begingroup$ Also, I like the Button& approach, but when I try Manipulate[Dynamic@output, {{output, "start",}, Button["do", output = "Paused..."; FinishDynamic[]; Pause[3]; output = "done"] &}] it never displays "Paused" $\endgroup$ Commented Feb 20, 2015 at 3:10
  • $\begingroup$ I don't know DynamicWrapper very well but it seems to essentially refresh every second? For example running counter = 0; Button[DynamicWrapper["hi", counter++], Print@counter] and pressing the button gives large numbers. $\endgroup$ Commented Feb 20, 2015 at 3:14
  • $\begingroup$ @PhilipMaymin I think the first solution above is not what you're after, if Pause represents any function. -- The Button (2nd comment) never displays "Paused" because the whole computation is completed before the Front End is notified of any updates. -- The counter++ is executed every time counter changes value, similar to Dynamic[counter++]; and since it changes value every time counter++ is executed, you get an infinite loop. $\endgroup$ Commented Feb 20, 2015 at 3:27
  • $\begingroup$ Your updated solution is perfect! Great solution. Thanks very much. $\endgroup$ Commented Feb 20, 2015 at 3:42