Could someone who understands Lua explain what is going on here? This reference (
http://www.lua.org/pil/3.6.html) describes Lua table constructors. Based on that, it looks like this:
SignalTable = {001,
[mc.ISIG_INPUT0] = function (on_off)
if (on_off == 1) then
mc.mcCntlCycleStart(inst)
end
end
}
would construct a new table stored in SignalTable with [1] = 001 and [mc.ISIG_INPUT0] = function...
1. Why is the 001 needed?
2. If I want to add additional signals and functions, it seems as though I would need to add them to this SignalTable constructor inside the "{}", but in another post it said that the way to do that was to add additional constructors of the form:
SignalTable = {00n,
[mc.ISIG_INPUTn] = function (on_off)
if (on_off == 1) then
....
end
end
}
Wouldn't this overwrite the previous SignalTable declarations?