summaryrefslogtreecommitdiff
path: root/dalos.lua
diff options
context:
space:
mode:
authorPixel <pixel@nobis-crew.org>2009-12-20 17:03:21 +0100
committerPixel <pixel@nobis-crew.org>2009-12-20 17:03:21 +0100
commit1f84bc289695a02a503ff18d0611d2e20127ac9f (patch)
tree1dd8d831652b5ac9f0ef5a1073746b82810c43be /dalos.lua
parente35ec05baf3d3f8d490d9f2781f602499551a350 (diff)
Fixing a typo in the textbuffer, and removing the "prototypes" buffers from the main file. Dalos is now "complete".
Diffstat (limited to 'dalos.lua')
-rw-r--r--dalos.lua27
1 files changed, 10 insertions, 17 deletions
diff --git a/dalos.lua b/dalos.lua
index 5d13283..d0c1545 100644
--- a/dalos.lua
+++ b/dalos.lua
@@ -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()