Rob, …Am I really needing new glasses?
What is wrong here, I get this error
…book/Library/Application Support/Outlaw/Sandbox/126/Scenes/dashboard.lua:190: unexpected symbol near ‘then’
—The code is copied from Corona example newButton widget and I have added another test on target.id
— and it is failing… }:{| , thanks
local function onButtonEvent( event )
local phase = event.phase
local target = event.target
if ( “began” == phase ) then
print( target.id … " pressed" )
If (2 == target.id ) then ----- <=========This is the line in error CAN ANYONE SEE THE PROB?
target:setLabel( “DOCs” ) --set a new label
else
target:setLabel( “END” ) --set a new label
end
elseif ( “ended” == phase ) then
print( target.id … " released" )
target:setLabel( target.baseLabel ) --reset the label
end
return true
end
