When I use the onPress or onRelease functions on my buttons it triggers as soon as it gets created, before I even press it.
local widget = require("widget") local function listener() print( "pressed" ) end local button = widget.newButton{ onPress = listener() }
Is this supposed to happen or is it a bug? Is there a way to prevent it from triggering before getting pressed?