Using widget 2.0, I’m trying to create and use some sliders. My sliders appear, as a line with a ball on it that can be moved. I can move them. The listener is called. But <slider>.value never changes from what it was at the time the slider was created, no matter what the user does. Here are some snippets of my program:
[lua]
controlSlider = widget.newSlider({
top = screenH*1/3, left = screenW/6, width = screenW*2/3, value = 100*degreeOfControl,
listener = updateMap})
function updateMap()
readSettings()
. . .
end
function readSettings()
degreeOfControl = controlSlider.value/100
equalize = equalizeSlider.value/100.0
assist = assistSlider.value/100
special7 = special7Slider.value/50
end
[/lua]
Additional question: the page http://docs.coronalabs.com/api/library/widget/newSlider.html says that, in order to conserve memory, a slider must be made from an imageSheet. But nowhere does it say how to actually make use of that image sheet in the creation of the slider. Huh?? So I’m not using one, because I don’t know how. Would that be the issue?