--- a/py_ext/PythonFileCTNMixin.py Wed Oct 28 18:21:12 2020 +0200
+++ b/py_ext/PythonFileCTNMixin.py Mon Nov 02 10:56:09 2020 +0100
@@ -36,6 +36,8 @@
from py_ext.PythonEditor import PythonEditor
class PythonFileCTNMixin(CodeFile):
@@ -105,6 +107,14 @@
ret.append(("On_"+location_str+"_Change", "python_poll", ""))
+ def GetVarOnChangeContent(var): + returns given variable onchange field + function is meant to allow customization + return var.getonchange() def CTNGenerate_C(self, buildpath, locations):
# location string for that CTN
location_str = "_".join(map(str, self.GetCurrentLocation()))
@@ -112,11 +122,11 @@
return [onchangecall.strip() + "('" + var.getname() + "')"
- for onchangecall in var.getonchange().split(',')]
+ for onchangecall in self.GetVarOnChangeContent(var).split(',')] - return repr(var.getonchange()) \
- if var.getonchange() else None
+ content = self.GetVarOnChangeContent(var) + return repr(content) if content else None pyextname = self.CTNName()