kne / pybox2d-from-googlecode

Automatically exported from code.google.com/p/pybox2d
Other
0 stars 0 forks source link

Line joints are not cast properly #25

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a joint definition (jointDef) by using b2LineJointDef()
2. Create a joint (lineJoint) by using world.CreateJoint(jointDef)
3. If you try to get the joint object by using lineJoint.asLineJoint()
it fails.

What is the expected output? What do you see instead?

Expect to get a joint object.  Get an error message.

AttributeError: 'b2Joint' object has no attribute 'asLineJoint'

What version of the product are you using? On what operating system?
Python 2.5 on Windows

Please provide any additional information below.

In Box2D2.py line no 688 (in class b2JointDef) types dictionary is missing
e_lineJoint

Similarly line no 761 (in class b2Joint) types dictionary is missing
e_lineJoint as well.

Original issue reported on code.google.com by mangab...@gmail.com on 21 Sep 2009 at 2:51

GoogleCodeExporter commented 9 years ago
This was tested on Python 2.6 not 2.5 as reported.

Original comment by mangab...@gmail.com on 21 Sep 2009 at 11:44

GoogleCodeExporter commented 9 years ago
I mentioned that you should send me this as a bug, but I guess I was a bit
distracted. Box2D2 (the old version, Box2D is the new name for 2.0.2+). You did 
help
me with an oversight in that the b2Joint's typeName() did crash, but that didn't
affect the b2[Line]Joint itself.

In any case, r212 should fix the definition error.

Original comment by sir...@gmail.com on 24 Sep 2009 at 12:02