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.
Asked
Active
Viewed 1,667 times
10
Szabolcs
- 234,956
- 30
- 623
- 1,263
Ernst Stelzer
- 2,055
- 12
- 24
-
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. – Szabolcs Feb 22 '12 at 13:21
-
I have split off the question about the webcam: http://mathematica.stackexchange.com/questions/2148/release-the-web-camera-after-using-currentimage Please do not mix unrelated questions in the same post if possible. Ask them separately instead. – Szabolcs Feb 22 '12 at 13:45
2 Answers
3
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.
Artes
- 57,212
- 12
- 157
- 245
-
It should be noted that deselecting
Dynamic Updating Enabledturns off all dynamic updating, and also output cells containing dynamic objects already do not haveEvaluatableselected, so there is nothing to turn off. – Mr.Wizard Feb 22 '12 at 13:25 -
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. – Artes Feb 22 '12 at 13:35
3
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.
-
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. – Ernst Stelzer Feb 22 '12 at 16:13
-
@Ernst Please use with care, as I mentioned it doesn't appear to be very robust. – Szabolcs Feb 22 '12 at 16:54