# HG changeset patch # User Edouard Tisserant # Date 1603146289 -7200 # Node ID 2263f2ecf9bbd0c8facd4c13caaf7c00afddf225 # Parent 466c3df6783508b4e345b1218718f90ee4b8afe3# Parent d7b9c2ceb3fbd43c3ccd433f19e848eba69b9199 merge diff -r d7b9c2ceb3fb -r 2263f2ecf9bb py_ext/PythonFileCTNMixin.py --- a/py_ext/PythonFileCTNMixin.py Mon Oct 19 10:17:18 2020 +0200 +++ b/py_ext/PythonFileCTNMixin.py Tue Oct 20 00:24:49 2020 +0200 @@ -111,7 +111,8 @@ configname = self.GetCTRoot().GetProjectConfigNames()[0] def _onchangecode(var): - return var.getonchange() + "('" + var.getname() + "')" + return [onchangecall.strip() + "('" + var.getname() + "')" + for onchangecall in var.getonchange().split(',')] def _onchange(var): return repr(var.getonchange()) \ @@ -159,7 +160,9 @@ if changes.next(): # %(name)s try: - %(onchangecode)s +""" % varinfo + """ + """ + """ + """.join(varinfo['onchangecode'])+""" except Exception as e: errors.append("%(name)s: "+str(e)) """ % varinfo for varinfo in varinfos if varinfo["onchange"]]) diff -r d7b9c2ceb3fb -r 2263f2ecf9bb tests/python/plc.xml --- a/tests/python/plc.xml Mon Oct 19 10:17:18 2020 +0200 +++ b/tests/python/plc.xml Tue Oct 20 00:24:49 2020 +0200 @@ -1,7 +1,7 @@ - + diff -r d7b9c2ceb3fb -r 2263f2ecf9bb tests/python/py_ext_0@py_ext/pyfile.xml --- a/tests/python/py_ext_0@py_ext/pyfile.xml Mon Oct 19 10:17:18 2020 +0200 +++ b/tests/python/py_ext_0@py_ext/pyfile.xml Tue Oct 20 00:24:49 2020 +0200 @@ -2,7 +2,7 @@ - +