We have a know problem with the spinner when setting the list before the spinner has been drawn to screen. If you only set list after it is drawn, then you should be ok. Like this:-
//Called when application is started.
function OnStart()
{
//Create a layout with objects vertically centered.
lay = app.CreateLayout( "linear", "VCenter,FillXY" );
//Create image 1/5 of screen width and correct aspect ratio.
img = app.CreateImage( "/Sys/Img/Hello.png", 0.2, -1 );
lay.AddChild( img );
//Create a button 1/3 of screen width and 1/10 screen height.
btn = app.CreateButton( "Press Me", 0.3, 0.1 );
btn.SetMargins( 0, 0.05, 0, 0 );
btn.SetOnTouch( btn_OnTouch );
lay.AddChild( btn );
spin = app.CreateSpinner([1,2,3,4,5,6], 0.2 );
spin.SetOnChange(ChangePage);
lay.AddChild( spin );
//Add layout to app.
app.AddLayout( lay );
}
function ChangePage( page )
{
console.log( page );
}
//Called when user touches our button.
function btn_OnTouch()
{
spin.SetList([1,2,3]);
}