aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--ClientHamr/GuiLua/skang.lua12
1 files changed, 12 insertions, 0 deletions
diff --git a/ClientHamr/GuiLua/skang.lua b/ClientHamr/GuiLua/skang.lua
index f203a83..da89792 100644
--- a/ClientHamr/GuiLua/skang.lua
+++ b/ClientHamr/GuiLua/skang.lua
@@ -311,6 +311,18 @@ Other Thing things are -
311 NOTE that skang.thing{} doesn't care what other names you pass in, they all get assigned to the thing. 311 NOTE that skang.thing{} doesn't care what other names you pass in, they all get assigned to the thing.
312 312
313 313
314Maybe I can rename this to thingasm? B-)
315 Then widget becomes skang?
316 local thingasm = require 'thingasm'
317 thingasm('foo', 'help text) -- In this case the surrounding Lua environment becomes the module of foo.
318 -- If the first argument (or first in the table) is a string, then it's this form.
319 -- All others include the module as the first argument, which would be a table.
320 foo:('bar', 'some help', types='table') -- And now foo is the module.
321 foo.bar:{'baz', types='Stuff'} -- thingasm({foo.bar, 'baz', ...})
322 foo.bar.baz:{'field0'} -- thingasm({foo.bar.baz, 'field0'})
323 foo.bar.baz:{'field1'}
324
325
314 Widget - 326 Widget -
315 Merging widgets might work to. B-) 327 Merging widgets might work to. B-)
316 This does make the entire "Things with the same name link automatically" deal work easily, since they ARE the same Thing. 328 This does make the entire "Things with the same name link automatically" deal work easily, since they ARE the same Thing.