aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/GuiLua/test.skang
diff options
context:
space:
mode:
authorDavid Walter Seikel2015-03-22 17:35:10 +1000
committerDavid Walter Seikel2015-03-22 17:35:10 +1000
commitb75e596af61da88aa705491778a5fd6845ab43ba (patch)
tree1f969b3c4012ae0fb81ab7591ea559403efe855a /src/GuiLua/test.skang
parentNew idea about contact sets. (diff)
downloadSledjHamr-b75e596af61da88aa705491778a5fd6845ab43ba.zip
SledjHamr-b75e596af61da88aa705491778a5fd6845ab43ba.tar.gz
SledjHamr-b75e596af61da88aa705491778a5fd6845ab43ba.tar.bz2
SledjHamr-b75e596af61da88aa705491778a5fd6845ab43ba.tar.xz
Add internal reference for skang modules, so they can find themselves.
Diffstat (limited to '')
-rw-r--r--src/GuiLua/test.skang6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/GuiLua/test.skang b/src/GuiLua/test.skang
index e3b303b..6346a4a 100644
--- a/src/GuiLua/test.skang
+++ b/src/GuiLua/test.skang
@@ -1,14 +1,14 @@
1#!/usr/bin/env skang -l test -- Lua allows this shell hack. 1#!/usr/bin/env skang -l test -- Lua allows this shell hack.
2 2
3-- There's an implied local skang = require 'skang' 3-- There's an implied skang = require 'skang'
4-- There's an implied local test = require 'test' 4-- There's an implied test = require 'test'
5 5
6-- This is a bit more verbose than I wanted. lol 6-- This is a bit more verbose than I wanted. lol
7local win = skang.window(200, 100, "G'day planet.", 'testWindow') 7local win = skang.window(200, 100, "G'day planet.", 'testWindow')
8skang.thingasm{win, 'quitter', 'Quits the skang window', types = 'widget', widget='"button", "Quit", 10, 10, 100, 30'} 8skang.thingasm{win, 'quitter', 'Quits the skang window', types = 'widget', widget='"button", "Quit", 10, 10, 100, 30'}
9win.W.quitter.action = 'skang.quit()' -- TODO Should look it up in ThingSpace.commands, and translate 'quit' into the Lua 'skang.quit()'? 9win.W.quitter.action = 'skang.quit()' -- TODO Should look it up in ThingSpace.commands, and translate 'quit' into the Lua 'skang.quit()'?
10 10
11skang.thingasm{win, 'ffuncer', 'Calls ffunc', types = 'widget', widget='"button", "ffunc()", 10, 40, 100, 30', action='test.ffunc(3, 4)'} 11skang.thingasm{win, 'ffuncer', 'Calls ffunc', types = 'widget', widget='"button", "ffunc()", 10, 40, 100, 30', action='ffunc(3, 4)'}
12 12
13test.bar = 'things' 13test.bar = 'things'
14test.ffunc(1, 'two') 14test.ffunc(1, 'two')