JungleJim
07-04-2007, 04:13 PM
A "mean queen" exception pops up whenever I try to store a Position object into an array of positions.
More Detail>>> says that it is an ArrayStoreException which should occur when Array covariance is broken during run time. So I print out the value being stored and a default value out of the array (after disabling the set item to command) and both print out as having class ecu.cmu....math.Vector3. Here is the code being played:
set item 0 to right=1,up=2,forward=3 in Chicken.mark more...
print item 0 from Chicken.mark
print right=1,up=2,forward=3
If Chicken.mark were not an array of positions, then command 2 above should not print out a Vector3. If the result of the ,, operation were not a Vector3 then the 3rd command would not print out a Vector3. The first command is what triggers the exception (because disabling it removes the exception)
Is there some kind of hidden coercion in the first command changing the class of the value to be stored???
If so, is there a workaround?
Thanks
More Detail>>> says that it is an ArrayStoreException which should occur when Array covariance is broken during run time. So I print out the value being stored and a default value out of the array (after disabling the set item to command) and both print out as having class ecu.cmu....math.Vector3. Here is the code being played:
set item 0 to right=1,up=2,forward=3 in Chicken.mark more...
print item 0 from Chicken.mark
print right=1,up=2,forward=3
If Chicken.mark were not an array of positions, then command 2 above should not print out a Vector3. If the result of the ,, operation were not a Vector3 then the 3rd command would not print out a Vector3. The first command is what triggers the exception (because disabling it removes the exception)
Is there some kind of hidden coercion in the first command changing the class of the value to be stored???
If so, is there a workaround?
Thanks