--- a/controls/VariablePanel.py Tue Jun 10 11:40:50 2014 +0200
+++ b/controls/VariablePanel.py Wed Jun 11 16:42:27 2014 +0200
@@ -307,8 +307,8 @@
self.ParentWindow.SaveValues()
elif (element_type not in ["config", "resource", "function"] and values[1] == "Global" and
self.ParentWindow.Filter in ["All", "Interface", "External"] or
- element_type != "function" and values[1] == "location"):
- if values[1] == "location":
+ element_type != "function" and values[1] in ["location", "NamedConstant"]): + if values[1] in ["location","NamedConstant"]: @@ -323,6 +323,7 @@
var_infos = self.ParentWindow.DefaultValue.copy()
var_infos.Name = var_name
var_infos.Type = values[2]
+ var_infos.Documentation = values[4] if values[1] == "location":
if not location.startswith("%"):
@@ -360,6 +361,13 @@
var_infos.Class = "Global"
var_infos.Location = location
+ elif values[1] == "NamedConstant": + if element_type in ["functionBlock","program"]: + var_infos.Class = "Local" + var_infos.InitialValue = values[0] var_infos.Class = "External"
var_infos.Number = len(self.ParentWindow.Values)