summaryrefslogtreecommitdiff
path: root/server
diff options
context:
space:
mode:
Diffstat (limited to 'server')
-rw-r--r--server/xml/example2.xml12
1 files changed, 7 insertions, 5 deletions
diff --git a/server/xml/example2.xml b/server/xml/example2.xml
index ddcc4e6..826b694 100644
--- a/server/xml/example2.xml
+++ b/server/xml/example2.xml
@@ -24,8 +24,10 @@
</maps>
<luaprograms>
<luaprogram name="theanswer">
- if( tonumber(value) == 42 )
+ fisk = getValue('sphere')
+ if( tonumber(fisk) == tonumber(value) )
then
+ setValue('cyl', value)
return true
else
return false
@@ -40,15 +42,15 @@
<frame name="linse_frame" caption="Linser:" layout="vbox">
<frame name="linse_framea" layout="hbox">
<label name="a" width="300" caption="Akse rotation:"/>
- <lineedit name="linse4" regexp="[24]*" map="axis" lua="theanswer" value="90K"/>
+ <lineedit name="axis" regexp="[24]*" map="axis" lua="theanswer" value="244"/>
</frame>
<frame name="linse_frameb" layout="hbox">
<label name="b" width="300" caption="Sphere:"/>
- <lineedit name="linse2" regexp="-{0,1}[0-9]{1,3}\.[0-9]{1,3}" map="sphere" value="90K"/>
+ <lineedit name="sphere" regexp="[24]*" map="sphere" value="42"/>
</frame>
<frame name="linse_framec" layout="hbox">
- <label name="c" width="300" caption="Sphere:"/>
- <lineedit name="linse3" regexp="-{0,1}[0-9]{1,3}\.[0-9]{1,3}" map="cyl" value="90K"/>
+ <label name="c" width="300" caption="Cyl:"/>
+ <lineedit name="cyl" regexp="[24]*" map="cyl" value=""/>
</frame>
</frame>
<frame name="buttons" layout="hbox">