Hi,
I have a very simple problem but for some reason this seems complicated:
main.lua <- here I have a display.newText “Hello World”
some_module.lua <- here I have a function that needs to be able to change the text in main into something else
No matter what I do inside some_module the text doesn’t change or there is an error. I need some way to make the object in main available to the external function. Is it at all possible to accomplish?
[edit: code example]
-- Main.lua local somemodule = require("some\_module") labelText = display.newText({options}) labelText.text = "Hello World"
-- some\_module.lua labelText.text="Something" -- nope main.labelText.text="Something" -- nope? -- ?