I need to set the onRelease parameter for the widget button from a string in a table (using it in a multi-language project). Is there a way to do what I am trying to do below?
butbuy = widget.newButton {
id = "butbuy",
default = imgDir.. tSearch["butbuy"][1],
over = imgDir.. tSearch["butbuy"][6],
width = tSearch["butbuy"][2], height = tSearch["butbuy"][3],
onRelease = tSearch["butbuy"][7]
}
Currently I am getting the follow error message:
…Users/mac/Documents/K2/CandiceMulti/build/page_2.lua:102: attempt to call field ‘?’ (a string value)
stack traceback
I have tried to write the string in the table like this “callAction”, or this callAction (without the quotes) but nothing seems to work…
Any help will be more than welcomed.
Thanks! [import]uid: 4883 topic_id: 28910 reply_id: 328910[/import]