diff options
author | David Walter Seikel | 2014-03-27 00:00:54 +1000 |
---|---|---|
committer | David Walter Seikel | 2014-03-27 00:00:54 +1000 |
commit | 67f822eeb04229c06b42297675cfa53bdcb414de (patch) | |
tree | 6b32a4cf4df1791ea13d2e5b9522c01bb48d12c8 /ClientHamr/GuiLua/skang.lua | |
parent | More Stuff notes. (diff) | |
download | SledjHamr-67f822eeb04229c06b42297675cfa53bdcb414de.zip SledjHamr-67f822eeb04229c06b42297675cfa53bdcb414de.tar.gz SledjHamr-67f822eeb04229c06b42297675cfa53bdcb414de.tar.bz2 SledjHamr-67f822eeb04229c06b42297675cfa53bdcb414de.tar.xz |
No need to pass module to skang.thing(), it can work it out.
Diffstat (limited to 'ClientHamr/GuiLua/skang.lua')
-rw-r--r-- | ClientHamr/GuiLua/skang.lua | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/ClientHamr/GuiLua/skang.lua b/ClientHamr/GuiLua/skang.lua index e81c598..adf4edf 100644 --- a/ClientHamr/GuiLua/skang.lua +++ b/ClientHamr/GuiLua/skang.lua | |||
@@ -304,7 +304,10 @@ end | |||
304 | -- required - "boolean" to say if this thing is required. TODO - Maybe fold this into types somehow, or acl? | 304 | -- required - "boolean" to say if this thing is required. TODO - Maybe fold this into types somehow, or acl? |
305 | -- acl - Access Control List defining security restrains. | 305 | -- acl - Access Control List defining security restrains. |
306 | -- boss - the Thing or person that owns this Thing, otherwise it is self owned. | 306 | -- boss - the Thing or person that owns this Thing, otherwise it is self owned. |
307 | thing = function (module, names, help, default, types, widget, required, acl, boss) | 307 | thing = function (names, help, default, types, widget, required, acl, boss) |
308 | -- Grad the environment of the calling function, so this new thing automatically becomes a global in it. | ||
309 | module = getfenv(2) | ||
310 | |||
308 | -- Break out the names. | 311 | -- Break out the names. |
309 | local n = {} | 312 | local n = {} |
310 | local i = 1 | 313 | local i = 1 |
@@ -382,12 +385,12 @@ end | |||
382 | quit = function () | 385 | quit = function () |
383 | end | 386 | end |
384 | 387 | ||
385 | thing(_M, 'nada', 'Do nothing.', nada) | 388 | thing('nada', 'Do nothing.', nada) |
386 | thing(_M, 'clear', 'The current skin is cleared of all widgets.', clear) | 389 | thing('clear', 'The current skin is cleared of all widgets.', clear) |
387 | thing(_M, 'window', 'The size and title of the application Frame.', window, 'x,y,name', nil, nil, 'GGG') | 390 | thing('window', 'The size and title of the application Frame.', window, 'x,y,name', nil, nil, 'GGG') |
388 | thing(_M, 'module', 'Load a module.', module, 'file,acl') | 391 | thing('module', 'Load a module.', module, 'file,acl') |
389 | thing(_M, 'skang', 'Parse the contents of a skang file or URL.', skang, 'URL') | 392 | thing('skang', 'Parse the contents of a skang file or URL.', skang, 'URL') |
390 | thing(_M, 'quit', 'Quit, exit, remove thyself.', quit) | 393 | thing('quit', 'Quit, exit, remove thyself.', quit) |
391 | 394 | ||
392 | 395 | ||
393 | moduleEnd(_M) | 396 | moduleEnd(_M) |