I’m attempting to convert some code that was working for Widgets v1. The area I’m struggling with is the id field of tab bar buttons.
local tabButtons = { { id = "add", label = "Add", defaultFile = "add.png", overFile = "add-down.png", width = 24, height = 24, onPress = onTabButtonPress, selected = true } }
But when I try to reference them as I did using Widgets v1 (which worked), they always come back as nil.
local function onTabButtonPress(event) print(event.target.id) end
Can someone let me know why? I’m very new to Corona, so it might be something pretty obvious.