View Single Post
  #7  
Old 03-22-2005, 06:33 PM
Johannes Johannes is offline
Member
 
Join Date: Jan 2005
Posts: 143
Strange Print out

Working since hours on the following strange behavior:

I append the position of a ball to an array (in a director function).

Then I draw the ball in a timer function. It usually works fine but sometimes it just does not draw the ball (load the file) even though it should!


The following code should produce the print out pattern



g [[0.0, 0.98499999999999999, -0.7870197730163716]]
Loading File: ../resources/joNew/050305_ballGreenOpac.WRL
g [[0.0, 0.98499999999999999, -0.7870197730163716]]

but it does not:


Code:
if len(greyBallPositions) >0:
			print 'g',greyBallPositions
			for greyBallP in greyBallPositions:
				greyBall=BallSubClass('hallo1')
				greyBall.getTrial(0)
				greyBall.initializeValues()
				greyBall.translate(greyBallP)
				greyBallBasket.append(greyBall)
				print 'g',greyBallPositions
				del greyBallPositions[0]


Loading File: ../resources/joNew/050305_ballGreenOpac.WRL
g [[0.0, 0.98499999999999999, -0.7870197730163716]]
slfvy 2.0
g [[0.0, 0.98499999999999999, -0.7870197730163716]]

Why?

In the above case it is still working, in a case where the loading is printed even earlier it is not.

e,g,

Loading File: ../resources/joNew/050305_ballBlue.WRL
trial 1
slfvy 2.0
halooBall 1
Loading File: ../resources/joNew/050305_ballBlueOpac.WRL
0001j [[0.0, 0.98499999999999999, -0.40376310574821728]]
gg [[0.0, 0.98499999999999999, -0.40376310574821728]]
slfvy 2.0
gg [[0.0, 0.98499999999999999, -0.40376310574821728]]
Loading File: ../resources/joNew/050305_ballGreenOpac.WRL
g [[0.0, 1.1785294171243699, -0.28742693506383571]]
slfvy 2.0
g [[0.0, 1.1785294171243699, -0.28742693506383571]]


At 0001j the position for the ball ist just loaded in the array greyBallPositions.

The greyBalls are subjobjects of the class Ball, maybe I made something wrong there?

It is getting late, so I might not be that clear...
Johannes
Reply With Quote