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/
_______________________________________________
dev-context mailing list
[email protected]
http://www.ntg.nl/mailman/listinfo/dev-context