diff options
-rw-r--r-- | dalos-textbuffer.lua | 2 | ||||
-rw-r--r-- | dalos.lua | 27 |
2 files changed, 11 insertions, 18 deletions
diff --git a/dalos-textbuffer.lua b/dalos-textbuffer.lua index b1e3c03..5b15e5f 100644 --- a/dalos-textbuffer.lua +++ b/dalos-textbuffer.lua @@ -10,7 +10,7 @@ dalosp.textbuffer = { self.extra.text = text
local b = Buffer(true)
b:write(text)
- self.set_houtput(b)
+ self:set_houtput(b)
end
end,
@@ -683,24 +683,17 @@ load "dalos-textbuffer.lua" ---------------- -d = dalos.canvas {} -m = dalos.menu(d) +function dalos:main() + d = self.canvas {} + m = self.menu(d) -b1 = Buffer(true) -b1:write("Buffer 1 contents") -b2 = Buffer(true) -b2:write("Buffer 2 contents") + dlg = iup.dialog { d, title = "Dalos", menu = m } -o1 = dalos.object(d, { y = 30, x = 10, noutputs = 1, name = "Buffer 1", otype = dalos.objtype.HANDLE }) -o2 = dalos.object(d, { y = 120, x = 10, noutputs = 1, name = "Buffer 2", otype = dalos.objtype.HANDLE }) + self.dialog = dlg -o1:set_houtput(b1) -o2:set_houtput(b2) - -dlg = iup.dialog { d, title = "Dalos", menu = m } - -dalos.dialog = dlg + dlg:show() + iup.MainLoop() + dlg:hide() +end -dlg:show() -iup.MainLoop() -dlg:hide() +dalos:main() |