From: Bruce S. <bas...@un...> - 2002-07-02 02:53:48
|
On second thought, I guess it isn't a bug, though there might be a missing feature. Here's the issue: When you assign a new set of points trail.pos = trail.pos[1:], as far as Visual is concerned you could be assigning any completely new list, as in trail.pos = mylist. When the new assignment is noticed, Visual has no choice but to adjust the length of the trail.color list to be the same as the length of the trail.pos list. Visual doesn't know anything about the "1", just that a shorter list is being assigned to trail.pos. So it doesn't and can't do an intelligent job and delete the first slot in the color list; it arbitrarily deletes the last slot in the color list. You could argue that a better arbitrary guess would be to delete the first slot rather than the last, and I don't know where that would take us. What this does suggest is that what is missing is a method for the curve object which would let you specify how to slice the pos and color lists in the same way at the same time. Bruce Sherwood At 10:36 PM 02/07/01 -0400, Bruce Sherwood wrote: >This looks like a bug to me, and I'll try to see whether it can be fixed >(assuming it's a bug, not a feature!). Here is a workaround, though it is >a workaround that will do the wrong thing in the future if the bug is fixed: > > trail.color[:-1] = trail.color[1:] # move the colors down one slot to > compensate > trail.pos = trail.pos[1:] # delete first slot in the position list > >Bruce Sherwood |