17 Jul
2010
17 Jul
'10
10:13 a.m.
On Sat, Jul 17 2010, luigi scarso wrote:
Why don't put them into a table as is in http://www.lua.org/pil/10.1.html For exampl e placefloat.lua should be placefloat ={ props = { [...]
Because I like to avoid redundancy. It's easy to do things like this automatically: local placefloat = {} setfenv(0, placefloat) dofile("placefloat.lua") setfenv(0, _G) print(placefloat.props.fixpart) Or like this: placefloat.lua: entry = { -- or "command" props = ..., args = ..., ... } And then: local commands = {} dofile("placefloat.lua") commands.placefloat = entry (or command) print(placefloat.props.fixpart) Cheers, Peter -- Contact information: http://pmrb.free.fr/contact/