Enabling support for direct array variable declaration
authorlaurent
Wed, 14 Sep 2011 23:05:04 +0200
changeset 556 69214983dd03
parent 555 b6f9d08fd69f
child 557 0f591ac019f3
Enabling support for direct array variable declaration
DataTypeEditor.py
VariablePanel.py
--- a/DataTypeEditor.py	Tue Sep 13 13:01:04 2011 +0200
+++ b/DataTypeEditor.py	Wed Sep 14 23:05:04 2011 +0200
@@ -285,7 +285,7 @@
 
     def _init_coll_ArrayPanelSizer_Items(self, parent):
         parent.AddSizer(self.ArrayPanelLeftSizer, 0, border=0, flag=wx.GROW)
-        parent.AddSizer(self.ArrayPanelRightSizer, 0, border=0, flag=0)
+        parent.AddSizer(self.ArrayPanelRightSizer, 0, border=0, flag=wx.GROW)
         parent.AddWindow(self.ArrayDimensions, 0, border=5, flag=wx.GROW|wx.ALL)
         
     def _init_coll_ArrayPanelSizer_Growables(self, parent):
--- a/VariablePanel.py	Tue Sep 13 13:01:04 2011 +0200
+++ b/VariablePanel.py	Wed Sep 14 23:05:04 2011 +0200
@@ -794,9 +794,9 @@
             pouname, poutype = self.Controler.GetEditedElementType(self.TagName)
             classtype = self.Table.GetValueByName(row, "Class")
             
-            #new_id = wx.NewId()
-            #AppendMenu(type_menu, help='', id=new_id, kind=wx.ITEM_NORMAL, text=_("Array"))
-            #self.Bind(wx.EVT_MENU, self.VariableArrayTypeFunction, id=new_id)
+            new_id = wx.NewId()
+            AppendMenu(type_menu, help='', id=new_id, kind=wx.ITEM_NORMAL, text=_("Array"))
+            self.Bind(wx.EVT_MENU, self.VariableArrayTypeFunction, id=new_id)
             
             if classtype in ["Input", "Output", "InOut", "External", "Global"] or \
             poutype != "function" and bodytype in ["ST", "IL"]: