[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: scope, design patterns?
- From: "Patrick Mc(avery" <spell_gooder_now@...>
- Date: Mon, 27 Dec 2010 22:05:41 -0500
Thanks very much Javier
Information is finally starting to penetrate through my skull!
Would this be a useful layout:
files === main.lua, localsCollector.lua, library.lua
---untested pseudo code-----
localsCollector.lua file:
local maintable = {}
do
dofile(library.lua)--library.lua has local table A
maintable.A = A
end
repeat adding more local tables to maintable....
end
return maintable
then I could bring maintable into main.lua with another dofile()
Thanks to your code, I'd have one big table with several nested tables
that are private to one another.
Every time I add a local table to maintable I am not assigning new
variables right? but just referring to the ones defined in another scope?
There seems to be some differences of opinion about modules, would this
layout work and allow me to dodge the module debate?
Thanks again for your time-Patrick
- References:
- scope, design patterns?, Patrick Mc(avery
- Re: scope, design patterns?, Tomas Guisasola Gorham
- Re: scope, design patterns?, Patrick Mc(avery
- Re: scope, design patterns?, Sean Conner
- Re: scope, design patterns?, Patrick Mc(avery
- Re: scope, design patterns?, Patrick Mc(avery
- Re: scope, design patterns?, Patrick Mc(avery
- Re: scope, design patterns?, Javier Guerra Giraldez