setText crash

self.myConnectionText = OnscreenText(text = "Press O to Open Connection to mocap suit", style=2, fg=(1,1,1,1),
        pos=(1.3,0.95), align=TextNode.ARight, scale = .07)


self.myConnectionText.setText("Opened Connection.  Please send data from AnimaDemo")

This generates “attribute arror: PandaNode has no attribute setText.” This code works on one machine running 1.6.2 but not on two others running 1.6.2? Any ideas?

Try passing mayChange = True to the OnscreenText constructor.

This became the default parameter value with Panda3D 1.6.0. Prior to that, the default was mayChange = False, which leads to the kind of error message you describe if you try to call setText(). Are you sure these other machines aren’t running Panda3D version 1.5.x?


Thanks, this solved the problem and works as expected.