4
$\begingroup$

This is an example from the documentation for Button :

DynamicModule[
    {a = "start"},
    {Button["does time out", Pause[6]; a = "end"],
     Dynamic[a]}
]

It shows that, with the default Method -> "Preemptive" option, the action times out after 5 seconds.

Is there a way to change this timeout for example to 10 seconds without setting the Method to "Queued"?

If this is not possible, is there a recommended way of detecting inside the GUI code running in the front end if there are currently Queued evaluations running?

$\endgroup$
2
  • 3
    $\begingroup$ See if DynamicEvaluationTimeout helps. $\endgroup$
    – Michael E2
    Commented Jul 30, 2015 at 15:58
  • $\begingroup$ Michael, it works! Thank you. Why don't you write it up as an answer? $\endgroup$ Commented Jul 30, 2015 at 18:57

1 Answer 1

4
$\begingroup$

DynamicEvaluationTimeout and Style may be used to locally set the dynamic timeout bound:

DynamicModule[{a = "start"},
 Style[{
   Button["does time out", Pause[6]; a = "end"],
   Dynamic[a]},
  DynamicEvaluationTimeout -> 10]]
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.