--- a/PLCControler.py Thu Apr 28 13:05:57 2016 +0300
+++ b/PLCControler.py Thu Apr 28 15:21:02 2016 +0300
@@ -1972,7 +1972,7 @@
else:
element_infos["Type"] = element_type_type.upper()
if element.initialValue is not None:
- element_infos["Initial Value"] = str(element.initialValue.getvalue())
+ element_infos["Initial Value"] = element.initialValue.getvalue()
else:
element_infos["Initial Value"] = ""
infos["elements"].append(element_infos)
@@ -1983,7 +1983,7 @@
else basetype_content_type.upper())
if datatype.initialValue is not None:
- infos["initial"] = str(datatype.initialValue.getvalue())
+ infos["initial"] = datatype.initialValue.getvalue()
else:
infos["initial"] = ""
return infos
--- a/editors/DataTypeEditor.py Thu Apr 28 13:05:57 2016 +0300
+++ b/editors/DataTypeEditor.py Thu Apr 28 15:21:02 2016 +0300
@@ -74,10 +74,11 @@
return row + 1
colname = self.GetColLabelValue(col, False)
value = self.data[row].get(colname, "")
+
if colname == "Type" and isinstance(value, TupleType):
if value[0] == "array":
return "ARRAY [%s] OF %s" % (",".join(map(lambda x : "..".join(x), value[2])), value[1])
- return str(value)
+ return value
def SetValue(self, row, col, value):
if col < len(self.colnames):