From 2830fe489465297ce369cff8a1b86e16217d184a Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Thu, 27 Mar 2014 02:24:25 +1000 Subject: Have a default default. --- ClientHamr/GuiLua/skang.lua | 1 + ClientHamr/GuiLua/test.lua | 2 ++ 2 files changed, 3 insertions(+) (limited to 'ClientHamr/GuiLua') diff --git a/ClientHamr/GuiLua/skang.lua b/ClientHamr/GuiLua/skang.lua index bc59f85..29b62a9 100644 --- a/ClientHamr/GuiLua/skang.lua +++ b/ClientHamr/GuiLua/skang.lua @@ -234,6 +234,7 @@ __newindex could catch a table being assigned - test.foo = {widget = '...', acl= -- Default things values. Thing.help = 'No description supplied.' +Thing.default = '' Thing.types = {'string'} Thing.required = false --Thing.acl = '' diff --git a/ClientHamr/GuiLua/test.lua b/ClientHamr/GuiLua/test.lua index 5a5fda1..96d46e6 100644 --- a/ClientHamr/GuiLua/test.lua +++ b/ClientHamr/GuiLua/test.lua @@ -48,6 +48,8 @@ end -- Test it. local skang = require 'skang' local test = require 'test' + +print('foo = ' .. test.foo .. ' ->> ' .. skang.things.foo.help) print('End ' .. test.bar .. ' ' .. test.VERSION .. ' ' .. skang.things.ffunc.help .. ' ->> ' .. skang.things.f.action) test.ffunc('one', 2) --skang.things.ffunc('seven', 'aight') -- cgit v1.1