So I want to call a function from a different file. Without the widget it works perfect but with the widget it doesnt want to work.
moduleA.lua
function M.newFunction( ) print(111) end
start.lua
local button = widget.newButton { x = y = width = height = font = defaultFile = overFile = onEvent = SC.newFunction() }
While you and I are here. How would i get touch events like this?
function M.newFunction( event ) if event.phase == "ended" then print(111) end end
Thanks!
–SonicX278