diff options
author | David Walter Seikel | 2015-07-09 04:13:13 +1000 |
---|---|---|
committer | David Walter Seikel | 2015-07-09 04:13:13 +1000 |
commit | 88a9790f848d15d4053288655057994e06d37224 (patch) | |
tree | 2e2a677b17380b25fc2a703e513f400e6bb4f000 /docs | |
parent | Document crazy idea I had for implementing Skang's _123 via metatables. (diff) | |
download | SledjHamr-88a9790f848d15d4053288655057994e06d37224.zip SledjHamr-88a9790f848d15d4053288655057994e06d37224.tar.gz SledjHamr-88a9790f848d15d4053288655057994e06d37224.tar.bz2 SledjHamr-88a9790f848d15d4053288655057994e06d37224.tar.xz |
Fix some typoes, and white space.
Diffstat (limited to '')
-rw-r--r-- | docs/ClientHamr/README.GuiLua | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/docs/ClientHamr/README.GuiLua b/docs/ClientHamr/README.GuiLua index 3d4bb1c..55c7fa4 100644 --- a/docs/ClientHamr/README.GuiLua +++ b/docs/ClientHamr/README.GuiLua | |||
@@ -5,7 +5,7 @@ similar names, it's not exactly the same. It's more accurate to say | |||
5 | this is in the spirit of matrix-RAD. | 5 | this is in the spirit of matrix-RAD. |
6 | 6 | ||
7 | The ultimate goal is for the various ClientHamr parts to be able to | 7 | The ultimate goal is for the various ClientHamr parts to be able to |
8 | either host their own UI, or have it hosted in the in world 3D window. | 8 | either host their own UI, or have it hosted in the in world 3D window. |
9 | Matrix-RAD's ability to run either server or client side, with no change | 9 | Matrix-RAD's ability to run either server or client side, with no change |
10 | to the code, is great for this sort of thing. If I can manage the | 10 | to the code, is great for this sort of thing. If I can manage the |
11 | ability to "tear off" windows, in other words, pull them out of the 3D | 11 | ability to "tear off" windows, in other words, pull them out of the 3D |
@@ -34,7 +34,7 @@ access to the Edje Lua stuff I've already written, but drag it outside | |||
34 | of an edje file. | 34 | of an edje file. |
35 | 35 | ||
36 | This pretty much means that GuiLua should be a shared library, coz in | 36 | This pretty much means that GuiLua should be a shared library, coz in |
37 | the ClientHamr use case, several programs are gonna be using it at once. | 37 | the ClientHamr use case, several programs are gonna be using it at once. |
38 | Should also be separate modules for development stuff like the skin | 38 | Should also be separate modules for development stuff like the skin |
39 | editor, which could be just another proggy using GuiLua. | 39 | editor, which could be just another proggy using GuiLua. |
40 | 40 | ||
@@ -56,7 +56,7 @@ probably can deal with that though, I'm not familiar enough with them to | |||
56 | know. Eo on the other hand allegedly offers introspection, which was | 56 | know. Eo on the other hand allegedly offers introspection, which was |
57 | always the corner stone of matrix-RAD. So access to elementary widgets | 57 | always the corner stone of matrix-RAD. So access to elementary widgets |
58 | via Eo might be possible. That's kinda the entire hook I'm hoping will | 58 | via Eo might be possible. That's kinda the entire hook I'm hoping will |
59 | help to make matrix-RAD style stuff work as well as it did there. | 59 | help to make matrix-RAD style stuff work as well as it did there. |
60 | Apparently when they promised introspection with Eo, they meant compile | 60 | Apparently when they promised introspection with Eo, they meant compile |
61 | time, not run time. | 61 | time, not run time. |
62 | 62 | ||
@@ -75,7 +75,7 @@ interested parties - | |||
75 | "First step is to write edje functions for generically bundling up one | 75 | "First step is to write edje functions for generically bundling up one |
76 | or more Lua tables into a message, sending that message, then unpacking | 76 | or more Lua tables into a message, sending that message, then unpacking |
77 | it again. This will be able to be done from edje, from C, and from Lua | 77 | it again. This will be able to be done from edje, from C, and from Lua |
78 | directly. Perhaps adding that as one more edje messege type. This is | 78 | directly. Perhaps adding that as one more edje message type. This is |
79 | for sending Lua tables between threads. A later addition will be to | 79 | for sending Lua tables between threads. A later addition will be to |
80 | send them through the 'net, probably as eet. | 80 | send them through the 'net, probably as eet. |
81 | 81 | ||
@@ -141,7 +141,7 @@ Skang notes | |||
141 | ----------- | 141 | ----------- |
142 | 142 | ||
143 | So, what will this variation of skang look like? For a start, the | 143 | So, what will this variation of skang look like? For a start, the |
144 | syntax will have to be more Lua like, so that's a real basic change. | 144 | syntax will have to be more Lua like, so that's a real basic change. |
145 | Can't use a space as an argument separator, Lua allows only ',' and | 145 | Can't use a space as an argument separator, Lua allows only ',' and |
146 | ';'. Strings can still use single or double quotes. | 146 | ';'. Strings can still use single or double quotes. |
147 | 147 | ||
@@ -168,11 +168,11 @@ foo = widget.label(0, "otherWidget+0.1", 0.5, 0, 'Text goes here") | |||
168 | While failing to fall asleep, I had another idea, though not sure how | 168 | While failing to fall asleep, I had another idea, though not sure how |
169 | feasible it is just yet. _123 could use a metatable thingy at the | 169 | feasible it is just yet. _123 could use a metatable thingy at the |
170 | lowest level, and just translates that to a value, the value being a | 170 | lowest level, and just translates that to a value, the value being a |
171 | number. Or something hand wavey like that. lol | 171 | number. Or something hand wavy like that. lol |
172 | 172 | ||
173 | In skang.lua _M is the modules table, and it's a local, it's also a | 173 | In skang.lua _M is the modules table, and it's a local, it's also a |
174 | proxy table. So _M's metatable's __index could check if it's a _123, | 174 | proxy table. So _M's metatable's __index could check if it's a _123, |
175 | then return the 123 as the value. As a bonus, we could do arithmatic | 175 | then return the 123 as the value. As a bonus, we could do arithmetic |
176 | via this metatable. | 176 | via this metatable. |
177 | 177 | ||
178 | "widget" would be a table with functions for dealing with widgets. It | 178 | "widget" would be a table with functions for dealing with widgets. It |
@@ -212,7 +212,7 @@ foo = 'bar' -- Using the metatable to override '=' to set the actual value of th | |||
212 | bar = foo -- The reverse of the above. Though perhaps these can't be done? | 212 | bar = foo -- The reverse of the above. Though perhaps these can't be done? |
213 | foo = foo .. 'stuff' .. 'more stuff' .. 'another line of the dropdown or whatever' | 213 | foo = foo .. 'stuff' .. 'more stuff' .. 'another line of the dropdown or whatever' |
214 | 214 | ||
215 | OK, first two can't be done, metatable only overides that for table elements. The third one can only be (I might be wrong there) - | 215 | OK, first two can't be done, metatable only overrides that for table elements. The third one can only be (I might be wrong there) - |
216 | 216 | ||
217 | foo.value = 'stuff' .. 'more stuff' | 217 | foo.value = 'stuff' .. 'more stuff' |
218 | foo.value = foo.value .. 'another line of the dropdown or whatever' | 218 | foo.value = foo.value .. 'another line of the dropdown or whatever' |
@@ -240,7 +240,7 @@ local other = require('otherPackageName') | |||
240 | skang.clear | 240 | skang.clear |
241 | skang.window(200, 200, "G'day planet.") | 241 | skang.window(200, 200, "G'day planet.") |
242 | quitter = widget.button('Quit', 0.5, 0.5, 0.5, 0.5) | 242 | quitter = widget.button('Quit', 0.5, 0.5, 0.5, 0.5) |
243 | quitter:action('quit') -- 'quit' is looked up in ThingSpcae.commands, and translated into the Lua 'skang.quit()'. | 243 | quitter:action('quit') -- 'quit' is looked up in ThingSpace.commands, and translated into the Lua 'skang.quit()'. |
244 | other.foo = 'stuff' | 244 | other.foo = 'stuff' |
245 | this.bar = other.foo | 245 | this.bar = other.foo |
246 | 246 | ||