I’m using hump.Signal, and I’m having trouble assigning the value received from the message to a local property:
Signal.register('onButtonClick', function( info )
currentInfo = info
end)
local currentInfo = {} --<< Stays empty!
local function showInfo(parent)
local nameText = display.newText( {
parent = parent,
text = currentInfo.name, --<< Error here!!
x = _CX,
y = _CY ,
} )
end
function scene:create( event )
local sceneGroup = self.view
showInfo(sceneGroup)
end
What is the proper way to achieve this?