lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hello steve,

It was you that helped me to solve this issue in thread:
"require in another enviroment"

Not having mod as a global is not an issue for me in this particular case:

file 1
--------------
UGen={isUGen=true,specialIndex=0,visited=false,channels={}}
function UGen:new(o)
..
require "file2"
..

file2
-------------
Line=UGen:new{name='Line'}

So when I do local env = loadinEnv"file1"
loadinEnv("anotherfile",env)

to get all globals in env table (and not mixed with other previous globals)
there is a complain about UGen not being defined in file2

Best
victor bombi