From e80ccdfac750fdd318eecb35b5f48a3d251ec7ec Mon Sep 17 00:00:00 2001 From: deva Date: Mon, 9 Jun 2008 06:49:58 +0000 Subject: Made output accumulation in a buffer and write in the end, thus enabling the corretc outputting of the error box if neccessary. --- server/xml/macros/example.xml | 43 ++++++++++++++++++++++++++----------------- 1 file changed, 26 insertions(+), 17 deletions(-) (limited to 'server/xml/macros') diff --git a/server/xml/macros/example.xml b/server/xml/macros/example.xml index ce6e2c0..635dea2 100644 --- a/server/xml/macros/example.xml +++ b/server/xml/macros/example.xml @@ -1,5 +1,5 @@ - + @@ -8,12 +8,6 @@ -- LUA program return math.pi, 1234567890 - - -- LUA program - right_axis = 0 - if( lensmeter.right.axis ) right_axis = lensmeter.right.axis.value - return right_axis, lensmeter.right.sphere.timestamp - -- LUA program return lensmeter.right.cyl.value, lensmeter.right.cyl.timestamp @@ -21,10 +15,11 @@ - fisk = getValue('sphere') - if( tonumber(fisk) == tonumber(value) ) + sphere = tonumber(getValue('sphere')) + axis = tonumber(getValue('axis')) + if( sphere == axis ) then - setValue('cyl', value) + setValue('cyl', name) return true else return false @@ -32,24 +27,38 @@ -