# HG changeset patch # User Edouard Tisserant # Date 1607611695 -3600 # Node ID 467ff0e58327817f238300ad7d442a754903b92e # Parent e50d32c747b3a3d4f3c110816e95ecc6bdd98ac9 Add a little test to see OnChange's .count .first .last in action diff -r e50d32c747b3 -r 467ff0e58327 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>