Looking at the code again, you actually don't need to go the approach of
passing an argument. The global "amp" should work. You just need to not be
futzing around with it. Get rid of the three commented out lines. They do
you no good.
Ben Root
On Wed, Dec 17, 2014 at 4:06 PM, Benjamin Root wrote
First, I am not sure what you think the reset() method does. samp.reset()
does one job. It RESETS the slider. You are not seeing the bar move because
it keeps getting reset. Take it out from your code. I do not know what you
are trying to do with it.
Second, numerical values in python are not muta
I have a simple oscillatory animation with a parameter "amp", which I control
with a slider.
The control works (when I do a mouse-drag on the slider bar), but the slide
bar never actually changes it's position because the reset call fails.
I don't see why the global statement should have any effec
the reset() method is meant to return the slider back to its initialized
value, that's it.
I suspect what you are having difficulties with has to do with your use of
a global variable "amp". It is going to be completely unlikely that updates
to the slider's "val" attribute would actually be updati
[This post might appear twice, if so, I apologize. The first version is
flagged that it has not been accepted yet]
I am controlling a simple animation with a slider, successfully. A mouse
drag updates the parameter correctly but the slider-bar position is not
updated.
If "samp" is a slider, the c