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?
Answer
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]]
Comments
Post a Comment