# HG changeset patch # User Edouard Tisserant # Date 1607611695 -3600 # Node ID 10b2e620b57ffaafec68ccd1e9c5e1b8ca0f05e3 # Parent 56453485c6add1a897b9bda1cd9d56b5eb62c525 Add a little test to see OnChange's .count .first .last in action diff -r 56453485c6ad -r 10b2e620b57f tests/python/py_ext_0@py_ext/pyfile.xml --- a/tests/python/py_ext_0@py_ext/pyfile.xml Thu Dec 10 14:54:42 2020 +0100 +++ b/tests/python/py_ext_0@py_ext/pyfile.xml Thu Dec 10 15:48:15 2020 +0100 @@ -1,7 +1,7 @@ <?xml version='1.0' encoding='utf-8'?> <PyFile xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <variables> - <variable name="SomeVarName" type="DINT" onchange="MyFunc"/> + <variable name="SomeVarName" type="DINT" onchange="MyFunc, SomeChange"/> <variable name="Grumpf" type="STRING" initial="'mhoo'" onchange="MyFunc, MyOtherFunc"/> </variables> <globals> @@ -15,6 +15,11 @@ def MyOtherFunc(*args): print "other", args +def SomeChange(*args): + print "count",OnChange.SomeVarName.count + print "first",OnChange.SomeVarName.first + print "last",OnChange.SomeVarName.last + ]]></xhtml:p> </globals>