aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/lib
diff options
context:
space:
mode:
authorDavid Walter Seikel2014-05-16 18:52:28 +1000
committerDavid Walter Seikel2014-05-16 18:52:28 +1000
commit89d42715b7c768ab56c45a0a36ba577c6ef26a5a (patch)
tree22f456be3deb027390ab8caa6b479de5b0f893fd /lib
parentCommented out attempt to debug push_lua(). Still a bit dodgy. (diff)
downloadSledjHamr-89d42715b7c768ab56c45a0a36ba577c6ef26a5a.zip
SledjHamr-89d42715b7c768ab56c45a0a36ba577c6ef26a5a.tar.gz
SledjHamr-89d42715b7c768ab56c45a0a36ba577c6ef26a5a.tar.bz2
SledjHamr-89d42715b7c768ab56c45a0a36ba577c6ef26a5a.tar.xz
Big TODO++
Diffstat (limited to 'lib')
-rw-r--r--lib/skang.lua30
1 files changed, 30 insertions, 0 deletions
diff --git a/lib/skang.lua b/lib/skang.lua
index 394c3f8..5c4aec7 100644
--- a/lib/skang.lua
+++ b/lib/skang.lua
@@ -1058,6 +1058,36 @@ wMum.__call = function (func, ...)
1058end 1058end
1059]] 1059]]
1060 1060
1061--[[ TODO - Widgets doing the right thing, in the right place.
1062
1063GOAL - GuiLua.c -> _on_click() -> lauL_dostring(L, wid->action)
1064 We want this action to be performed in the environment of the module that created the widget.
1065 Or the one that set the action.
1066
1067 purkle
1068 local purkle = require 'purkle'
1069 local win = skang.window(....
1070 win = copy(widgets ....
1071 win.window = Cwindow( ....
1072 lightuserdata *winFang
1073 skang.thingasm{win, 'button1' .... types = 'widget', widget='"button", ....
1074 args = loadstring('"button", ....
1075 setfenv(args, win)
1076 thingy.Cwidget = widget(win.window, args())
1077 winFang *(win.window)
1078 Widget->data = L
1079 Widget->obj "clicked" callback = _on_click, Widget *
1080 lightuserdata *widget
1081 parent.W[name] = thingy
1082 win.W.button1.action = 'purkle.say(' ....
1083 aIsValid(....
1084 action(button1, ....
1085 Widget->action = ....
1086
1087Store the name of the module that created a window in winFang.
1088Store the winFang a widget is in in Widget.
1089]]
1090
1061window = function(w, h, title, name) 1091window = function(w, h, title, name)
1062 name = name or 'myWindow' 1092 name = name or 'myWindow'
1063 local win = {} 1093 local win = {}