I copied this code from some app but i m pasting in here(editor) it cant run it's javascript help me to know
//Called when application is started. function OnStart() { //Create a layout with objects vertically centered. lay = app.CreateLayout( "linear", "VCenter,FillXY" ); //Create some text. txt = app.CreateText( "Text" ); txt.SetTextSize( 22 ); lay.AddChild( txt ); //Create an image with width of 0.1 x screen width. img = app.CreateImage( "/Sys/Img/Icon.png", 0.1 ); img.SetMargins( 0, 0.02, 0, 0 ); img.SetOnTouchDown( img_OnTouchDown ); lay.AddChild( img ); //Create a button. btn = app.CreateButton( "Button", 0.4 ); btn.SetMargins( 0, 0.02, 0, 0 ); btn.SetOnTouch( btn_OnTouch ); lay.AddChild( btn ); //Create a toggle button. tgl = app.CreateToggle( "Toggle Button", 0.4 ); tgl.SetMargins( 0, 0.02, 0, 0 ); tgl.SetOnTouch( tgl_OnTouch ); lay.AddChild( tgl ); //Create a check box. chk = app.CreateCheckBox( "Check Box" ); chk.SetMargins( 0, 0.02, 0, 0 ); chk.SetOnTouch( chk_OnTouch ); lay.AddChi