widget.newButton function params?

Hello,

i try to send params to a function i call with the onRelease property of a Button:

 alert = widget.newButton { width = 150, height = 50, label = "Timer", onRelease = createalert("5") }

but as soon as i start my app, createalert(“5”) will directly called without pressing the button… if i use “onRelease = createalert” everything is fine… but i use the function with several button so i have to give params to the function…

some workarounds for this?

You could send the 5 as the id

[lua]

onRelease=function() createalert(“5”) end

[/lua]

  • C

You could send the 5 as the id

[lua]

onRelease=function() createalert(“5”) end

[/lua]

  • C