Fixed bug with return type in elements that don't need return type tree and dimension
--- a/PLCControler.py Tue Sep 10 10:35:18 2013 +0200
+++ b/PLCControler.py Tue Sep 10 10:36:44 2013 +0200
@@ -2376,7 +2376,7 @@
if words[0] == "T" and varname == words[2]:
return "BOOL"
if words[1] == varname:
- return self.GetPouInterfaceReturnType(pou)
+ return self.GetPouInterfaceReturnType(pou)[0]
for type, varlist in pou.getvars():
for var in varlist.getvariable():
if var.getname() == varname:
--- a/dialogs/BlockPreviewDialog.py Tue Sep 10 10:35:18 2013 +0200
+++ b/dialogs/BlockPreviewDialog.py Tue Sep 10 10:36:44 2013 +0200
@@ -177,7 +177,7 @@
# Add POU name to variable list if POU is a function
returntype = self.Controller.GetEditedElementInterfaceReturnType(
- self.TagName)
+ self.TagName)[0]
if returntype is not None:
self.VariableList[
self.Controller.GetEditedElementName(self.TagName)] = \
--- a/editors/LDViewer.py Tue Sep 10 10:35:18 2013 +0200
+++ b/editors/LDViewer.py Tue Sep 10 10:36:44 2013 +0200
@@ -487,7 +487,7 @@
for var in vars:
if var["Class"] != "Input" and var["Type"] == "BOOL":
varlist.append(var["Name"])
- returntype = self.Controler.GetEditedElementInterfaceReturnType(self.TagName, self.Debug)
+ returntype = self.Controler.GetEditedElementInterfaceReturnType(self.TagName, self.Debug)[0]
if returntype == "BOOL":
varlist.append(self.Controler.GetEditedElementName(self.TagName))
dialog.SetVariables(varlist)
@@ -801,7 +801,7 @@
for var in vars:
if var["Class"] != "Input" and var["Type"] == "BOOL":
varlist.append(var["Name"])
- returntype = self.Controler.GetEditedElementInterfaceReturnType(self.TagName, self.Debug)
+ returntype = self.Controler.GetEditedElementInterfaceReturnType(self.TagName, self.Debug)[0]
if returntype == "BOOL":
varlist.append(self.Controler.GetEditedElementName(self.TagName))
dialog.SetVariables(varlist)