Code: Select all
local choices = { "choice1", "choice2", "choice3",}
-----------------------------------------------------------
-- Retrieves bucketChoice table
-----------------------------------------------------------
function Choices()
return choices
end
Code: Select all
VFS.Include('file.lua')
local choices = Choices()
however, is it passing a reference or is it passing the value when I get the return in gadget.lua? Because my understanding is localizing creates a limited scope or does including flie.lua mean that it has a local choices as part of the gadget? The reason I ask is because I cannot access choices without creating a function to return it(WHICH imo is a good thing)
You can guess I am trying to see how I can get some kind of half assed private and public stuff going. (in before lua OO, I am still not conviced that use of metatables is needed)