widget.newSlider(...) doesn't work?!

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]

The reason why it’s failing for you is because you are a trial user (build 2012.704) and the reference page you are looking at says you must have a build greater than 2012.721.
The reference page for the slider you are looking for is here:
http://developer.anscamobile.com/reference/index/widgetnewslider

Note that any bugs you find with the slider in the build you are using are likely fixed in the daily builds. Look for a new Corona public release which will merge the daily build changes into the public build in the coming weeks. [import]uid: 52430 topic_id: 26490 reply_id: 107498[/import]

Thanks.

I found that in the meantime, copying the widget_ios directory, and the theme_ios.lua file worked fine.
[import]uid: 144151 topic_id: 26490 reply_id: 107740[/import]