Bug in slider object

Seth Morton <[email protected]>
Newsgroups gmane.comp.python.visualpython.user
Organization The Pennsylvania State University
Message-ID <[email protected]>
Hello all,

I may have found a bug in the slider object regarding setting self.value 
with __init__.  When you declare a slider the slider first runs 
ctrl.__init__, since it is a subclass of the ctrl object.  Inside of 
ctrl.__init__, if "value" is one of the arguments, it puts the value of 
"value" into self.value, which is defined with the property function of 
the slider as the method slider.setvalue.  In slider.setvalue, it wants 
to access self.axis, but self.axis is not defined until after 
ctrl.__init__.  This results as an AttributeError.  A workaround is to 
define value after running __init__ on the slider, but this is a bug 
that might want to be looked at.

As a side note, regarding the slider object, I have a feature request.  
It would be nice if there could be a label on the slider like for a 
button, so that the current value of the slider is displayed on the 
handle.  This is the case on the custom sliders in the colorsliders.py 
example for vpython.  Additionally, I notice that these sliders are made 
of a sphere and cylinder, not of boxes.  It might be nice for the user 
to be able to choose the shape of the slider, either boxes or smooth.

Seth Morton

------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.