I am getting errors like:
Part::partd:
Part specification standardBasis[[1]] is longer than depth of object.
with the following Manipulate expression:
Clear[ e1, e2, standardBasis, y]
e1 := {1, 0}
e2 := {0, 1}
standardBasis := {e1, e2}
y := 3
Manipulate[
p := {x, y} ;
Clear[j];
arrowsReference = Table[Arrow[{p, p + Part[standardBasis, j]}], {j, 2}]
, {{x, 1}, -10, 10} ]
The odd thing about it is that this only occurs immediately after starting Mathematica, on the source file that contains this manipulate. A second shift-enter on the expression after that works without complaint and I get the desired result.
This appears to be related to the startup of mathematica using specific notebooks. The sequence I'm using is:
- go to windows explorer.
- double click on a .nb or .cdf file with this source.
- click enable-dynamics.
- get the error.
- shift-enter: error goes away.
whereas if I take a notebook that is blank and already opened and then cut and paste this source into it, I don't get any errors about the Part[]
expressions.
Manipulate
. Doesn't seem to make sense here. $\endgroup$