diff options
Diffstat (limited to 'server/xml/example2.xml')
-rw-r--r-- | server/xml/example2.xml | 16 |
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:"/> |