|
From: Lenore H. <lh...@si...> - 2009-09-13 14:21:35
|
I was being stupid and thought I could pull some of the color-sliders
tricks into the regular controls package and have them for everything
instead of having to copy and paste revised definitions all the time.
After all, I could always re-install the controls.py and controls.pyc
files if I mangled them irrepairably. Maybe not.
I opened the package and just copied those to files back to the visual
folder in site packages - replacing my mangled ones. No dice.
I've wiped out Vpython and MacPython and reinstalled both. Still no
good. Controls complains about a property not existing that I can
plainly see in the code is defined.
Any suggestions for where the wrong definition continues to lurk?
Here's the error message.
s1 = slider(pos=(-50,0,0), width=2, length=10, min=0, max=pi/4,
value = 0.5, action=lambda: setangle(s1))
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/
python2.6/site-packages/visual/controls.py", line 245, in __init__
ctrl.__init__(self, args)
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/
python2.6/site-packages/visual/controls.py", line 85, in __init__
self.value = args['value']
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/
python2.6/site-packages/visual/controls.py", line 283, in setvalue
self.update(self.pos+self.axis*val*self.length/(self.max-self.min))
AttributeError: 'slider' object has no attribute 'axis'
I've tried it both with and without an explicit axis in the slider
call to no avail.
TIA,
Lenore
|