summaryrefslogtreecommitdiff
path: root/server/xml
diff options
context:
space:
mode:
authordeva <deva>2008-06-03 08:13:20 +0000
committerdeva <deva>2008-06-03 08:13:20 +0000
commitbb3fad646f94739a876869464a484c99795bce61 (patch)
tree1894d6b43055b654150bf9e56cc1baefce34dcad /server/xml
parent13b9aa0c0ab5a7b66c08f7a7e02c193530640ed3 (diff)
Added support for lua validator programs.
Diffstat (limited to 'server/xml')
-rw-r--r--server/xml/example2.xml16
1 files changed, 11 insertions, 5 deletions
diff --git a/server/xml/example2.xml b/server/xml/example2.xml
index 0bfee27..ddcc4e6 100644
--- a/server/xml/example2.xml
+++ b/server/xml/example2.xml
@@ -22,6 +22,16 @@
return lensmeter.right.cyl.value, lensmeter.right.cyl.timestamp
</map>
</maps>
+ <luaprograms>
+ <luaprogram name="theanswer">
+ if( tonumber(value) == 42 )
+ then
+ return true
+ else
+ return false
+ end
+ </luaprogram>
+ </luaprograms>
<window name="mainwindow"
caption="Fundus"
width="500"
@@ -30,11 +40,7 @@
<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_validator="if( tonumber(value) == 42 ) then return 'true' else return 'false' end"
- value="90K"/>
+ <lineedit name="linse4" regexp="[24]*" map="axis" lua="theanswer" value="90K"/>
</frame>
<frame name="linse_frameb" layout="hbox">
<label name="b" width="300" caption="Sphere:"/>