I posted on StackOverflow yesterday, this is the copy-paste of that question;
Thanks in advance!
I have scoured the documentation and google for a solution but none was found.
Simply: I want to pass data to a function, when a button is pressed. Issue: The buttons are dynamically created, so the data must be presented when the button is built.
The code looks like this;
myButton = widget.newButton({ x = width \* 0.875, y = height \* heightChange, width = width \* 0.18, height = height \* 0.09, defaultFile = "Assets/Images/button\_up.png", overFile = "Assets/Images/button\_down.png", onEvent = func\_myFunction })
But I want to do something like;
onEvent = func\_myFunction("My Data")
or
onEvent = func\_myFunction, myData
neither of which work. Any ideas?