I copied the code from the website
http://developer.anscamobile.com/reference/index/slider-after-build-2011715
local widget = require "widget"
require "display"
-- Callback listener for slider widget:
local sliderListener = function( event )
local sliderObj = event.target
print( "New value is: " .. event.target.value )
end
-- Create the slider widget
local slider = widget.newSlider{
top = 200,
left = 50,
listener = sliderListener
}
but when I tried to run it all that occurred was that the program crashed with the error
Runtime error: ?:0 attempt to index a nil value
stack traceback:
[C]: ?
?: in function "new"
?: in function <?:2530 <?<br> (tail call): ?
After some fiddling I found that the error occured when widget.newSlider(…) was called. Is this a bug?
This is incredibly frustrating as I need a slider to test, a key part of the gameplay. Thanks in advance for any replies. [import]uid: 144151 topic_id: 26490 reply_id: 326490[/import]