aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/ClientHamr/GuiLua/test.lua
diff options
context:
space:
mode:
authorDavid Walter Seikel2014-03-22 11:07:40 +1000
committerDavid Walter Seikel2014-03-22 11:07:40 +1000
commit395cf9375a64037891cc3567432044d8b486398a (patch)
treefcd97eb6860af096c2cf80aad5a5d9633eef5158 /ClientHamr/GuiLua/test.lua
parentA thing about other Thing things. (diff)
downloadSledjHamr-395cf9375a64037891cc3567432044d8b486398a.zip
SledjHamr-395cf9375a64037891cc3567432044d8b486398a.tar.gz
SledjHamr-395cf9375a64037891cc3567432044d8b486398a.tar.bz2
SledjHamr-395cf9375a64037891cc3567432044d8b486398a.tar.xz
Merge newCommand and newParam into "thing".
Diffstat (limited to '')
-rw-r--r--ClientHamr/GuiLua/test.lua10
1 files changed, 5 insertions, 5 deletions
diff --git a/ClientHamr/GuiLua/test.lua b/ClientHamr/GuiLua/test.lua
index 6518de8..525e66b 100644
--- a/ClientHamr/GuiLua/test.lua
+++ b/ClientHamr/GuiLua/test.lua
@@ -30,16 +30,15 @@ print('code')
30-- A variable that is private to this module. 30-- A variable that is private to this module.
31local foo 31local foo
32 32
33skang.newParam(_M, 'bar', "Required", "Shortcut", "Default", "Help text") 33skang.thing(_M, 'fooble,f', 'Help text goes here', 1, nil, '"edit", "The fooble:", 1, 1, 10, 50')
34skang.thing(_M, 'bar', 'Help text', "Default")
34 35
35-- We can use inline functions if we don't need the function internally. 36-- We can use inline functions if we don't need the function internally.
36skang.newCommand(_M, 'func', 'number,data', 'Help Text', function (arg1, arg2) 37skang.thing(_M, 'func', 'Help Text', function (arg1, arg2)
37 print('Inside test.func ' .. arg1 .. ', ' .. arg2) 38 print('Inside test.func ' .. arg1 .. ', ' .. arg2)
38end) 39end, 'number,string')
39
40 40
41print('Ending soon') 41print('Ending soon')
42
43skang.moduleEnd(_M) 42skang.moduleEnd(_M)
44 43
45end 44end
@@ -50,5 +49,6 @@ local skang = require 'skang'
50local test = require 'test' 49local test = require 'test'
51print('End ' .. test.bar .. ' ' .. test.VERSION .. ' ' .. skang.ThingSpace.commands.func.help) 50print('End ' .. test.bar .. ' ' .. test.VERSION .. ' ' .. skang.ThingSpace.commands.func.help)
52test.func('one', 2) 51test.func('one', 2)
52skang.ThingSpace.things.func('seven', 'aight')
53skang.ThingSpace.commands.func.func(3, 'four') 53skang.ThingSpace.commands.func.func(3, 'four')
54skang.ThingSpace.commands.func('five', 'six') 54skang.ThingSpace.commands.func('five', 'six')