I have two different Mathematica laptops with similar but different features. Both work fine when they are the only laptop. One of them successively fails when the other laptop is open, despite my (liberal) use of Clear [] to clear the corresponding variables.
Call it, say GlobalManipulate
ClearAll["Global`*"] Clear["Global`*"] Definition[linear] linear[x_] := ax; quad[x_] := ax^2; functionList := {linear, quad}; Manipulate[ Plot[function[dummy], {dummy, -10, 10}], {function, functionList}, {a, -10, 10}, LocalizeVariables -> False, TrackedSymbols -> All ]
Call it, say, LocalManipulate
Clear["Global`*"]; Manipulate[ { linear := ax; quad := ax^2; linear, quad, function, Plot[ ReleaseHold@function , {x, -10, 10}] }, {function, { HoldForm@linear , HoldForm@quad }}, {a, -10, 10}, TrackedSymbols -> All ]
When it starts on its own, GlobalManipulate works as expected, and I see that the graph, which is updated as a , is changing. The definition of linearity gives Null .
When LocalManipulate is open, it works, GlobalManipulate no longer works. even when restarted . This graph appears for a second and then disappears.
I reproduced this using my local copy of Mathematica 8 and a remote copy of Mathematica 7.
The problem should include the linear[x_] and quad[x_] functions since
GlobalManipulatePrime
ClearAll["Global`*"] Clear["Global`*"] Definition[linear] linear1[x_] := ax; quad1[x_] := ax^2; functionList := {linear1, quad1}; Manipulate[ Plot[function[dummy], {dummy, -10, 10}], {function, functionList}, {a, -10, 10}, LocalizeVariables -> False, TrackedSymbols -> All ]
works great.
Edited to add bold text to emphasize that I am reerunning Global, and that I am trying to understand why functions are saved, despite my ClearAll [].