# HG changeset patch # User laurent # Date 1260891039 -3600 # Node ID d22a4a95fd5ed244bb0128b32bb9e1655aa8f7c2 # Parent c47a09e1da3e36f5970a9a5142556468e8a6fdd5 Remove limitation on complex types in POU interface diff -r c47a09e1da3e -r d22a4a95fd5e PLCControler.py --- a/PLCControler.py Tue Dec 15 11:31:23 2009 +0100 +++ b/PLCControler.py Tue Dec 15 16:30:39 2009 +0100 @@ -1245,7 +1245,7 @@ return blocktypes # Return Data Types checking for recursion - def GetDataTypes(self, tagname = "", basetypes = True, complextypes = True, debug = False): + def GetDataTypes(self, tagname = "", basetypes = True, debug = False): if basetypes: datatypes = self.GetBaseTypes() else: @@ -1256,7 +1256,7 @@ words = tagname.split("::") if words[0] in ["D"]: name = words[1] - datatypes.extend(project.GetCustomDataTypes(name, complextypes=complextypes)) + datatypes.extend(project.GetCustomDataTypes(name)) return datatypes # Return Base Type of given possible derived type diff -r c47a09e1da3e -r d22a4a95fd5e VariablePanel.py --- a/VariablePanel.py Tue Dec 15 11:31:23 2009 +0100 +++ b/VariablePanel.py Tue Dec 15 16:30:39 2009 +0100 @@ -761,8 +761,7 @@ datatype_menu = wx.Menu(title='') # TODO : remove complextypes argument when matiec can manage complex types in pou interface - datatypes = self.Controler.GetDataTypes(basetypes = False, - complextypes = self.Table.GetValueByName(row, "Class") not in ["Input", "Ouput", "InOut"]) + datatypes = self.Controler.GetDataTypes(basetypes = False) for datatype in datatypes: new_id = wx.NewId() AppendMenu(datatype_menu, help='', id=new_id, kind=wx.ITEM_NORMAL, text=datatype) diff -r c47a09e1da3e -r d22a4a95fd5e plcopen/plcopen.py --- a/plcopen/plcopen.py Tue Dec 15 11:31:23 2009 +0100 +++ b/plcopen/plcopen.py Tue Dec 15 16:30:39 2009 +0100 @@ -649,12 +649,10 @@ setattr(cls, "GetCustomBlockResource", GetCustomBlockResource) # Return Data Types checking for recursion - def GetCustomDataTypes(self, exclude = "", complextypes = True): + def GetCustomDataTypes(self, exclude = ""): customdatatypes = [] for customdatatype in self.getdataTypes(): customdatatype_name = customdatatype.getname() - if not complextypes and customdatatype.baseType.getcontent()["name"] in ["array"]:#, "struct"]: - continue if customdatatype_name != exclude and not self.ElementIsUsedBy(exclude, customdatatype_name): customdatatypes.append(customdatatype_name) return customdatatypes