From 395cf9375a64037891cc3567432044d8b486398a Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Sat, 22 Mar 2014 11:07:40 +1000 Subject: Merge newCommand and newParam into "thing". --- ClientHamr/GuiLua/test.lua | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'ClientHamr/GuiLua/test.lua') 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') -- A variable that is private to this module. local foo -skang.newParam(_M, 'bar', "Required", "Shortcut", "Default", "Help text") +skang.thing(_M, 'fooble,f', 'Help text goes here', 1, nil, '"edit", "The fooble:", 1, 1, 10, 50') +skang.thing(_M, 'bar', 'Help text', "Default") -- We can use inline functions if we don't need the function internally. -skang.newCommand(_M, 'func', 'number,data', 'Help Text', function (arg1, arg2) +skang.thing(_M, 'func', 'Help Text', function (arg1, arg2) print('Inside test.func ' .. arg1 .. ', ' .. arg2) -end) - +end, 'number,string') print('Ending soon') - skang.moduleEnd(_M) end @@ -50,5 +49,6 @@ local skang = require 'skang' local test = require 'test' print('End ' .. test.bar .. ' ' .. test.VERSION .. ' ' .. skang.ThingSpace.commands.func.help) test.func('one', 2) +skang.ThingSpace.things.func('seven', 'aight') skang.ThingSpace.commands.func.func(3, 'four') skang.ThingSpace.commands.func('five', 'six') -- cgit v1.1