hello , i have a problem with 2013.1031 build, more specificaly this block of code returns me a runtime error … this code worked succesfuly with 2013.1008 build.
function scene:enterScene( event )
local group = self.view
local function onKeyEvent( event )
local phase = event.phase
local keyName = event.keyName
if( (keyName == "back") and (phase == "down") ) then
local function onComplete( event )
if "clicked" == event.action then
local i = event.index
if 1 == i then
native.cancelAlert( alert )
elseif 2 == i then
native.requestExit()
end
end
end
local alert = native.showAlert( "??????", "????? ???????? ??? ?????? ?? ???????? ??? ??? ????????;", { "???", "???" }, onComplete )
group:insert(alert); --line 450
return true
end
-- for default behavior, return false.
return false
end
Runtime:addEventListener( "key", onKeyEvent );
-----------------------------------------------------------------------------
-- INSERT code here (e.g. start timers, load audio, start listeners, etc.)
-----------------------------------------------------------------------------
end
the message said : Runtime error , menu.lua:450:ERROR:table expected.If this is a function call, youmight have used ‘.’ instead of ‘:’
Please help!!! [import]uid: 185094 topic_id: 36083 reply_id: 336083[/import]