Is there a simple way to switch off Dynamic
evaluation for a particular cell? I usually delete the cell if it disturbs other evaluations or affects the performance too dramatically.
-
$\begingroup$ Can you split the camera question to a new one? I think it's better not to mix the two questions. Then I'll answer. $\endgroup$– SzabolcsCommented Feb 22, 2012 at 13:21
-
$\begingroup$ I have split off the question about the webcam: mathematica.stackexchange.com/questions/2148/… Please do not mix unrelated questions in the same post if possible. Ask them separately instead. $\endgroup$– SzabolcsCommented Feb 22, 2012 at 13:45
2 Answers
You can click in the front-end
Evaluation
->Dynamic Updating Enabled
to switch off dynamic updating of the cell.
In case you want to switch off evaluation of the cell, click
Cell
->Cell Properties
-> Evaluatable
.
-
$\begingroup$ It should be noted that deselecting
Dynamic Updating Enabled
turns off all dynamic updating, and also output cells containing dynamic objects already do not haveEvaluatable
selected, so there is nothing to turn off. $\endgroup$ Commented Feb 22, 2012 at 13:25 -
$\begingroup$ I did not mean anything contrary to what you said. Option for turning off evaluation of the cell can be helpful as well. The first does not deny the latter. $\endgroup$– ArtesCommented Feb 22, 2012 at 13:35
This hack will try to switch off/on dynamic updating on a cell by cell basis, but it appears not to be very reliable:
PaletteNotebook@
Column[{Button["Dynamic off",
SetOptions[NotebookSelection[], DynamicUpdating -> False]],
Button["Dynamic on",
SetOptions[NotebookSelection[], DynamicUpdating -> True]]}]
Even if it is switched off for a cell, in certain cases updating might be triggered when the mouse is above control elements in the cell.
Usage:
The code above will create a palette. Select a cell and press the off or on button to switch dynamic updating off or on.
-
$\begingroup$ When used with Dynamic[Refresh[DateString[], UpdateInterval -> 1]] Off works, but On does not. But evaluating the command restarts the code. Very nice, just what I was looking for. $\endgroup$ Commented Feb 22, 2012 at 16:13
-
$\begingroup$ @Ernst Please use with care, as I mentioned it doesn't appear to be very robust. $\endgroup$– SzabolcsCommented Feb 22, 2012 at 16:54