author | laurent |
Tue, 05 Apr 2011 19:06:00 +0200 | |
changeset 525 | e8d5ab0855d3 |
parent 494 | c91644c2bfa7 |
child 560 | 3757f0de0d07 |
permissions | -rw-r--r-- |
27 | 1 |
#!/usr/bin/env python |
2 |
# -*- coding: utf-8 -*- |
|
3 |
||
4 |
#This file is part of PLCOpenEditor, a library implementing an IEC 61131-3 editor |
|
5 |
#based on the plcopen standard. |
|
6 |
# |
|
58 | 7 |
#Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD |
27 | 8 |
# |
9 |
#See COPYING file for copyrights details. |
|
10 |
# |
|
11 |
#This library is free software; you can redistribute it and/or |
|
12 |
#modify it under the terms of the GNU General Public |
|
13 |
#License as published by the Free Software Foundation; either |
|
14 |
#version 2.1 of the License, or (at your option) any later version. |
|
15 |
# |
|
16 |
#This library is distributed in the hope that it will be useful, |
|
17 |
#but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
18 |
#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|
58 | 19 |
#General Public License for more details. |
27 | 20 |
# |
21 |
#You should have received a copy of the GNU General Public |
|
22 |
#License along with this library; if not, write to the Free Software |
|
23 |
#Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
24 |
||
25 |
import wx |
|
64
dd6f693e46a1
Cleaning code for using only wxPython 2.6 class naming
lbessard
parents:
58
diff
changeset
|
26 |
import wx.grid |
27 | 27 |
|
121 | 28 |
|
29 |
#------------------------------------------------------------------------------- |
|
30 |
# Configuration Editor class |
|
31 |
#------------------------------------------------------------------------------- |
|
32 |
||
33 |
[ID_CONFIGURATIONEDITOR, |
|
34 |
] = [wx.NewId() for _init_ctrls in range(1)] |
|
35 |
||
36 |
class ConfigurationEditor(wx.Panel): |
|
37 |
||
38 |
def _init_ctrls(self, prnt): |
|
39 |
wx.Panel.__init__(self, id=ID_CONFIGURATIONEDITOR, name='', parent=prnt, |
|
40 |
size=wx.Size(0, 0), style=wx.SUNKEN_BORDER) |
|
41 |
||
42 |
def __init__(self, parent, tagname, window, controler): |
|
43 |
self._init_ctrls(parent) |
|
44 |
||
45 |
self.ParentWindow = window |
|
46 |
self.Controler = controler |
|
47 |
self.TagName = tagname |
|
48 |
||
49 |
def SetTagName(self, tagname): |
|
50 |
self.TagName = tagname |
|
51 |
||
52 |
def GetTagName(self): |
|
53 |
return self.TagName |
|
54 |
||
55 |
def IsViewing(self, tagname): |
|
56 |
return self.TagName == tagname |
|
57 |
||
407
0a324a874981
Adding support for integrating PLCOpenEditor in Beremiz frame
laurent
parents:
391
diff
changeset
|
58 |
def IsDebugging(self): |
0a324a874981
Adding support for integrating PLCOpenEditor in Beremiz frame
laurent
parents:
391
diff
changeset
|
59 |
return False |
0a324a874981
Adding support for integrating PLCOpenEditor in Beremiz frame
laurent
parents:
391
diff
changeset
|
60 |
|
121 | 61 |
def SetMode(self, mode): |
62 |
pass |
|
63 |
||
64 |
def ResetBuffer(self): |
|
65 |
pass |
|
66 |
||
67 |
def RefreshView(self): |
|
68 |
pass |
|
69 |
||
145 | 70 |
def RefreshScaling(self, refresh=True): |
71 |
pass |
|
72 |
||
365 | 73 |
def ClearErrors(self): |
74 |
pass |
|
75 |
||
27 | 76 |
#------------------------------------------------------------------------------- |
77 |
# Resource Editor class |
|
78 |
#------------------------------------------------------------------------------- |
|
79 |
||
391 | 80 |
def GetTasksTableColnames(): |
81 |
_ = lambda x : x |
|
82 |
return [_("Name"), _("Single"), _("Interval"), _("Priority")] |
|
83 |
||
84 |
def GetInstancesTableColnames(): |
|
85 |
_ = lambda x : x |
|
86 |
return [_("Name"), _("Type"), _("Task")] |
|
87 |
||
64
dd6f693e46a1
Cleaning code for using only wxPython 2.6 class naming
lbessard
parents:
58
diff
changeset
|
88 |
class ResourceTable(wx.grid.PyGridTableBase): |
27 | 89 |
|
90 |
""" |
|
64
dd6f693e46a1
Cleaning code for using only wxPython 2.6 class naming
lbessard
parents:
58
diff
changeset
|
91 |
A custom wx.grid.Grid Table using user supplied data |
27 | 92 |
""" |
93 |
def __init__(self, parent, data, colnames): |
|
94 |
# The base class must be initialized *first* |
|
64
dd6f693e46a1
Cleaning code for using only wxPython 2.6 class naming
lbessard
parents:
58
diff
changeset
|
95 |
wx.grid.PyGridTableBase.__init__(self) |
27 | 96 |
self.data = data |
97 |
self.colnames = colnames |
|
231
fc2d6cbb8b39
Adding support for highlighing compiling errors from matiec
lbessard
parents:
145
diff
changeset
|
98 |
self.Errors = {} |
27 | 99 |
self.Parent = parent |
100 |
||
101 |
self.ColAlignements = [] |
|
102 |
self.ColSizes = [] |
|
103 |
# XXX |
|
104 |
# we need to store the row length and collength to |
|
105 |
# see if the table has changed size |
|
106 |
self._rows = self.GetNumberRows() |
|
107 |
self._cols = self.GetNumberCols() |
|
108 |
||
109 |
def GetColAlignements(self): |
|
110 |
return self.ColAlignements |
|
111 |
||
112 |
def SetColAlignements(self, list): |
|
113 |
self.ColAlignements = list |
|
114 |
||
115 |
def GetColSizes(self): |
|
116 |
return self.ColSizes |
|
117 |
||
118 |
def SetColSizes(self, list): |
|
119 |
self.ColSizes = list |
|
120 |
||
121 |
def GetNumberCols(self): |
|
122 |
return len(self.colnames) |
|
123 |
||
124 |
def GetNumberRows(self): |
|
125 |
return len(self.data) |
|
126 |
||
391 | 127 |
def GetColLabelValue(self, col, translate=True): |
27 | 128 |
if col < len(self.colnames): |
391 | 129 |
if translate: |
130 |
return _(self.colnames[col]) |
|
27 | 131 |
return self.colnames[col] |
132 |
||
391 | 133 |
def GetRowLabelValues(self, row, translate=True): |
27 | 134 |
return row |
135 |
||
136 |
def GetValue(self, row, col): |
|
137 |
if row < self.GetNumberRows(): |
|
391 | 138 |
name = str(self.data[row].get(self.GetColLabelValue(col, False), "")) |
27 | 139 |
return name |
140 |
||
141 |
def GetValueByName(self, row, colname): |
|
142 |
return self.data[row].get(colname) |
|
143 |
||
144 |
def SetValue(self, row, col, value): |
|
145 |
if col < len(self.colnames): |
|
391 | 146 |
self.data[row][self.GetColLabelValue(col, False)] = value |
27 | 147 |
|
148 |
def SetValueByName(self, row, colname, value): |
|
149 |
if colname in self.colnames: |
|
150 |
self.data[row][colname] = value |
|
151 |
||
152 |
def ResetView(self, grid): |
|
153 |
""" |
|
64
dd6f693e46a1
Cleaning code for using only wxPython 2.6 class naming
lbessard
parents:
58
diff
changeset
|
154 |
(wx.grid.Grid) -> Reset the grid view. Call this to |
27 | 155 |
update the grid if rows and columns have been added or deleted |
156 |
""" |
|
157 |
grid.BeginBatch() |
|
158 |
for current, new, delmsg, addmsg in [ |
|
64
dd6f693e46a1
Cleaning code for using only wxPython 2.6 class naming
lbessard
parents:
58
diff
changeset
|
159 |
(self._rows, self.GetNumberRows(), wx.grid.GRIDTABLE_NOTIFY_ROWS_DELETED, wx.grid.GRIDTABLE_NOTIFY_ROWS_APPENDED), |
dd6f693e46a1
Cleaning code for using only wxPython 2.6 class naming
lbessard
parents:
58
diff
changeset
|
160 |
(self._cols, self.GetNumberCols(), wx.grid.GRIDTABLE_NOTIFY_COLS_DELETED, wx.grid.GRIDTABLE_NOTIFY_COLS_APPENDED), |
27 | 161 |
]: |
162 |
if new < current: |
|
64
dd6f693e46a1
Cleaning code for using only wxPython 2.6 class naming
lbessard
parents:
58
diff
changeset
|
163 |
msg = wx.grid.GridTableMessage(self,delmsg,new,current-new) |
27 | 164 |
grid.ProcessTableMessage(msg) |
165 |
elif new > current: |
|
64
dd6f693e46a1
Cleaning code for using only wxPython 2.6 class naming
lbessard
parents:
58
diff
changeset
|
166 |
msg = wx.grid.GridTableMessage(self,addmsg,new-current) |
27 | 167 |
grid.ProcessTableMessage(msg) |
168 |
self.UpdateValues(grid) |
|
169 |
grid.EndBatch() |
|
170 |
||
171 |
self._rows = self.GetNumberRows() |
|
172 |
self._cols = self.GetNumberCols() |
|
173 |
# update the column rendering scheme |
|
174 |
self._updateColAttrs(grid) |
|
175 |
||
176 |
# update the scrollbars and the displayed part of the grid |
|
177 |
grid.AdjustScrollbars() |
|
178 |
grid.ForceRefresh() |
|
179 |
||
180 |
def UpdateValues(self, grid): |
|
181 |
"""Update all displayed values""" |
|
182 |
# This sends an event to the grid table to update all of the values |
|
64
dd6f693e46a1
Cleaning code for using only wxPython 2.6 class naming
lbessard
parents:
58
diff
changeset
|
183 |
msg = wx.grid.GridTableMessage(self, wx.grid.GRIDTABLE_REQUEST_VIEW_GET_VALUES) |
27 | 184 |
grid.ProcessTableMessage(msg) |
185 |
||
186 |
def _updateColAttrs(self, grid): |
|
187 |
""" |
|
64
dd6f693e46a1
Cleaning code for using only wxPython 2.6 class naming
lbessard
parents:
58
diff
changeset
|
188 |
wx.grid.Grid -> update the column attributes to add the |
27 | 189 |
appropriate renderer given the column name. |
190 |
||
191 |
Otherwise default to the default renderer. |
|
192 |
""" |
|
193 |
||
194 |
for col in range(self.GetNumberCols()): |
|
64
dd6f693e46a1
Cleaning code for using only wxPython 2.6 class naming
lbessard
parents:
58
diff
changeset
|
195 |
attr = wx.grid.GridCellAttr() |
dd6f693e46a1
Cleaning code for using only wxPython 2.6 class naming
lbessard
parents:
58
diff
changeset
|
196 |
attr.SetAlignment(self.ColAlignements[col], wx.ALIGN_CENTRE) |
27 | 197 |
grid.SetColAttr(col, attr) |
198 |
grid.SetColSize(col, self.ColSizes[col]) |
|
199 |
||
200 |
for row in range(self.GetNumberRows()): |
|
201 |
for col in range(self.GetNumberCols()): |
|
202 |
editor = None |
|
203 |
renderer = None |
|
391 | 204 |
colname = self.GetColLabelValue(col, False) |
27 | 205 |
grid.SetReadOnly(row, col, False) |
206 |
if colname in ["Name","Interval"]: |
|
64
dd6f693e46a1
Cleaning code for using only wxPython 2.6 class naming
lbessard
parents:
58
diff
changeset
|
207 |
editor = wx.grid.GridCellTextEditor() |
dd6f693e46a1
Cleaning code for using only wxPython 2.6 class naming
lbessard
parents:
58
diff
changeset
|
208 |
renderer = wx.grid.GridCellStringRenderer() |
27 | 209 |
if colname == "Interval" and self.GetValueByName(row, "Single") != "": |
210 |
grid.SetReadOnly(row, col, True) |
|
211 |
elif colname == "Single": |
|
64
dd6f693e46a1
Cleaning code for using only wxPython 2.6 class naming
lbessard
parents:
58
diff
changeset
|
212 |
editor = wx.grid.GridCellChoiceEditor() |
27 | 213 |
editor.SetParameters(self.Parent.VariableList) |
214 |
if self.GetValueByName(row, "Interval") != "": |
|
215 |
grid.SetReadOnly(row, col, True) |
|
216 |
elif colname == "Type": |
|
64
dd6f693e46a1
Cleaning code for using only wxPython 2.6 class naming
lbessard
parents:
58
diff
changeset
|
217 |
editor = wx.grid.GridCellChoiceEditor() |
27 | 218 |
editor.SetParameters(self.Parent.TypeList) |
219 |
elif colname == "Priority": |
|
64
dd6f693e46a1
Cleaning code for using only wxPython 2.6 class naming
lbessard
parents:
58
diff
changeset
|
220 |
editor = wx.grid.GridCellNumberEditor() |
27 | 221 |
editor.SetParameters("0,65535") |
222 |
elif colname == "Task": |
|
64
dd6f693e46a1
Cleaning code for using only wxPython 2.6 class naming
lbessard
parents:
58
diff
changeset
|
223 |
editor = wx.grid.GridCellChoiceEditor() |
27 | 224 |
editor.SetParameters(self.Parent.TaskList) |
225 |
||
226 |
grid.SetCellEditor(row, col, editor) |
|
227 |
grid.SetCellRenderer(row, col, renderer) |
|
228 |
||
231
fc2d6cbb8b39
Adding support for highlighing compiling errors from matiec
lbessard
parents:
145
diff
changeset
|
229 |
if row in self.Errors and self.Errors[row][0] == colname.lower(): |
fc2d6cbb8b39
Adding support for highlighing compiling errors from matiec
lbessard
parents:
145
diff
changeset
|
230 |
grid.SetCellBackgroundColour(row, col, wx.Colour(255, 255, 0)) |
fc2d6cbb8b39
Adding support for highlighing compiling errors from matiec
lbessard
parents:
145
diff
changeset
|
231 |
grid.SetCellTextColour(row, col, wx.RED) |
fc2d6cbb8b39
Adding support for highlighing compiling errors from matiec
lbessard
parents:
145
diff
changeset
|
232 |
grid.MakeCellVisible(row, col) |
fc2d6cbb8b39
Adding support for highlighing compiling errors from matiec
lbessard
parents:
145
diff
changeset
|
233 |
else: |
fc2d6cbb8b39
Adding support for highlighing compiling errors from matiec
lbessard
parents:
145
diff
changeset
|
234 |
grid.SetCellTextColour(row, col, wx.BLACK) |
fc2d6cbb8b39
Adding support for highlighing compiling errors from matiec
lbessard
parents:
145
diff
changeset
|
235 |
grid.SetCellBackgroundColour(row, col, wx.WHITE) |
27 | 236 |
|
237 |
def SetData(self, data): |
|
238 |
self.data = data |
|
239 |
||
240 |
def GetData(self): |
|
241 |
return self.data |
|
242 |
||
243 |
def GetCurrentIndex(self): |
|
244 |
return self.CurrentIndex |
|
245 |
||
246 |
def SetCurrentIndex(self, index): |
|
247 |
self.CurrentIndex = index |
|
248 |
||
249 |
def AppendRow(self, row_content): |
|
250 |
self.data.append(row_content) |
|
251 |
||
252 |
def RemoveRow(self, row_index): |
|
253 |
self.data.pop(row_index) |
|
254 |
||
255 |
def MoveRow(self, row_index, move, grid): |
|
256 |
new_index = max(0, min(row_index + move, len(self.data) - 1)) |
|
257 |
if new_index != row_index: |
|
258 |
self.data.insert(new_index, self.data.pop(row_index)) |
|
259 |
grid.SetGridCursor(new_index, grid.GetGridCursorCol()) |
|
260 |
||
261 |
def Empty(self): |
|
262 |
self.data = [] |
|
263 |
self.editors = [] |
|
264 |
||
231
fc2d6cbb8b39
Adding support for highlighing compiling errors from matiec
lbessard
parents:
145
diff
changeset
|
265 |
def AddError(self, infos): |
fc2d6cbb8b39
Adding support for highlighing compiling errors from matiec
lbessard
parents:
145
diff
changeset
|
266 |
self.Errors[infos[0]] = infos[1:] |
fc2d6cbb8b39
Adding support for highlighing compiling errors from matiec
lbessard
parents:
145
diff
changeset
|
267 |
|
fc2d6cbb8b39
Adding support for highlighing compiling errors from matiec
lbessard
parents:
145
diff
changeset
|
268 |
def ClearErrors(self): |
fc2d6cbb8b39
Adding support for highlighing compiling errors from matiec
lbessard
parents:
145
diff
changeset
|
269 |
self.Errors = {} |
27 | 270 |
|
64
dd6f693e46a1
Cleaning code for using only wxPython 2.6 class naming
lbessard
parents:
58
diff
changeset
|
271 |
[ID_RESOURCEEDITOR, ID_RESOURCEEDITORSTATICTEXT1, |
dd6f693e46a1
Cleaning code for using only wxPython 2.6 class naming
lbessard
parents:
58
diff
changeset
|
272 |
ID_RESOURCEEDITORSTATICTEXT2, ID_RESOURCEEDITORINSTANCESGRID, |
dd6f693e46a1
Cleaning code for using only wxPython 2.6 class naming
lbessard
parents:
58
diff
changeset
|
273 |
ID_RESOURCEEDITORTASKSGRID, ID_RESOURCEEDITORADDINSTANCEBUTTON, |
dd6f693e46a1
Cleaning code for using only wxPython 2.6 class naming
lbessard
parents:
58
diff
changeset
|
274 |
ID_RESOURCEEDITORDELETEINSTANCEBUTTON, ID_RESOURCEEDITORUPINSTANCEBUTTON, |
dd6f693e46a1
Cleaning code for using only wxPython 2.6 class naming
lbessard
parents:
58
diff
changeset
|
275 |
ID_RESOURCEEDITORDOWNINSTANCEBUTTON, ID_RESOURCEEDITORADDTASKBUTTON, |
dd6f693e46a1
Cleaning code for using only wxPython 2.6 class naming
lbessard
parents:
58
diff
changeset
|
276 |
ID_RESOURCEEDITORDELETETASKBUTTON, ID_RESOURCEEDITORUPTASKBUTTON, |
dd6f693e46a1
Cleaning code for using only wxPython 2.6 class naming
lbessard
parents:
58
diff
changeset
|
277 |
ID_RESOURCEEDITORDOWNTASKBUTTON, |
27 | 278 |
] = [wx.NewId() for _init_ctrls in range(13)] |
279 |
||
280 |
class ResourceEditor(wx.Panel): |
|
281 |
||
113 | 282 |
if wx.VERSION < (2, 6, 0): |
283 |
def Bind(self, event, function, id = None): |
|
284 |
if id is not None: |
|
285 |
event(self, id, function) |
|
286 |
else: |
|
287 |
event(self, function) |
|
288 |
||
27 | 289 |
def _init_coll_InstancesSizer_Growables(self, parent): |
290 |
parent.AddGrowableCol(0) |
|
291 |
parent.AddGrowableRow(1) |
|
292 |
||
293 |
def _init_coll_InstancesSizer_Items(self, parent): |
|
64
dd6f693e46a1
Cleaning code for using only wxPython 2.6 class naming
lbessard
parents:
58
diff
changeset
|
294 |
parent.AddSizer(self.InstancesButtonsSizer, 0, border=0, flag=wx.GROW) |
dd6f693e46a1
Cleaning code for using only wxPython 2.6 class naming
lbessard
parents:
58
diff
changeset
|
295 |
parent.AddWindow(self.InstancesGrid, 0, border=0, flag=wx.GROW) |
27 | 296 |
|
297 |
def _init_coll_InstancesButtonsSizer_Growables(self, parent): |
|
298 |
parent.AddGrowableCol(0) |
|
299 |
parent.AddGrowableRow(0) |
|
300 |
||
301 |
def _init_coll_InstancesButtonsSizer_Items(self, parent): |
|
64
dd6f693e46a1
Cleaning code for using only wxPython 2.6 class naming
lbessard
parents:
58
diff
changeset
|
302 |
parent.AddWindow(self.staticText2, 0, border=0, flag=wx.ALIGN_BOTTOM) |
27 | 303 |
parent.AddWindow(self.AddInstanceButton, 0, border=0, flag=0) |
304 |
parent.AddWindow(self.DeleteInstanceButton, 0, border=0, flag=0) |
|
305 |
parent.AddWindow(self.UpInstanceButton, 0, border=0, flag=0) |
|
306 |
parent.AddWindow(self.DownInstanceButton, 0, border=0, flag=0) |
|
307 |
||
308 |
def _init_coll_TasksSizer_Growables(self, parent): |
|
309 |
parent.AddGrowableCol(0) |
|
310 |
parent.AddGrowableRow(1) |
|
311 |
||
312 |
def _init_coll_TasksSizer_Items(self, parent): |
|
64
dd6f693e46a1
Cleaning code for using only wxPython 2.6 class naming
lbessard
parents:
58
diff
changeset
|
313 |
parent.AddSizer(self.TasksButtonsSizer, 0, border=0, flag=wx.GROW) |
dd6f693e46a1
Cleaning code for using only wxPython 2.6 class naming
lbessard
parents:
58
diff
changeset
|
314 |
parent.AddWindow(self.TasksGrid, 0, border=0, flag=wx.GROW) |
27 | 315 |
|
316 |
def _init_coll_TasksButtonsSizer_Growables(self, parent): |
|
317 |
parent.AddGrowableCol(0) |
|
318 |
parent.AddGrowableRow(0) |
|
319 |
||
320 |
def _init_coll_TasksButtonsSizer_Items(self, parent): |
|
64
dd6f693e46a1
Cleaning code for using only wxPython 2.6 class naming
lbessard
parents:
58
diff
changeset
|
321 |
parent.AddWindow(self.staticText1, 0, border=0, flag=wx.ALIGN_BOTTOM) |
27 | 322 |
parent.AddWindow(self.AddTaskButton, 0, border=0, flag=0) |
323 |
parent.AddWindow(self.DeleteTaskButton, 0, border=0, flag=0) |
|
324 |
parent.AddWindow(self.UpTaskButton, 0, border=0, flag=0) |
|
325 |
parent.AddWindow(self.DownTaskButton, 0, border=0, flag=0) |
|
326 |
||
327 |
def _init_coll_MainGridSizer_Items(self, parent): |
|
124 | 328 |
parent.AddSizer(self.TasksSizer, 0, border=5, flag=wx.GROW|wx.TOP|wx.LEFT|wx.RIGHT) |
329 |
parent.AddSizer(self.InstancesSizer, 0, border=5, flag=wx.GROW|wx.BOTTOM|wx.LEFT|wx.RIGHT) |
|
27 | 330 |
|
331 |
def _init_coll_MainGridSizer_Growables(self, parent): |
|
332 |
parent.AddGrowableCol(0) |
|
333 |
parent.AddGrowableRow(0) |
|
334 |
parent.AddGrowableRow(1) |
|
335 |
||
336 |
def _init_sizers(self): |
|
337 |
self.MainGridSizer = wx.FlexGridSizer(cols=1, hgap=0, rows=2, vgap=5) |
|
338 |
self.InstancesSizer = wx.FlexGridSizer(cols=1, hgap=0, rows=2, vgap=5) |
|
339 |
self.InstancesButtonsSizer = wx.FlexGridSizer(cols=5, hgap=5, rows=1, vgap=0) |
|
340 |
self.TasksSizer = wx.FlexGridSizer(cols=1, hgap=0, rows=2, vgap=5) |
|
341 |
self.TasksButtonsSizer = wx.FlexGridSizer(cols=5, hgap=5, rows=1, vgap=0) |
|
342 |
||
343 |
self._init_coll_MainGridSizer_Growables(self.MainGridSizer) |
|
344 |
self._init_coll_MainGridSizer_Items(self.MainGridSizer) |
|
345 |
self._init_coll_InstancesSizer_Growables(self.InstancesSizer) |
|
346 |
self._init_coll_InstancesSizer_Items(self.InstancesSizer) |
|
347 |
self._init_coll_InstancesButtonsSizer_Growables(self.InstancesButtonsSizer) |
|
348 |
self._init_coll_InstancesButtonsSizer_Items(self.InstancesButtonsSizer) |
|
349 |
self._init_coll_TasksSizer_Growables(self.TasksSizer) |
|
350 |
self._init_coll_TasksSizer_Items(self.TasksSizer) |
|
351 |
self._init_coll_TasksButtonsSizer_Growables(self.TasksButtonsSizer) |
|
352 |
self._init_coll_TasksButtonsSizer_Items(self.TasksButtonsSizer) |
|
353 |
||
354 |
self.SetSizer(self.MainGridSizer) |
|
355 |
||
356 |
def _init_ctrls(self, prnt): |
|
64
dd6f693e46a1
Cleaning code for using only wxPython 2.6 class naming
lbessard
parents:
58
diff
changeset
|
357 |
wx.Panel.__init__(self, id=ID_RESOURCEEDITOR, name='', parent=prnt, |
80 | 358 |
size=wx.Size(0, 0), style=wx.SUNKEN_BORDER) |
27 | 359 |
|
64
dd6f693e46a1
Cleaning code for using only wxPython 2.6 class naming
lbessard
parents:
58
diff
changeset
|
360 |
self.staticText1 = wx.StaticText(id=ID_RESOURCEEDITORSTATICTEXT1, |
391 | 361 |
label=_(u'Tasks:'), name='staticText2', parent=self, pos=wx.Point(0, |
362 |
0), size=wx.DefaultSize, style=wx.ALIGN_CENTER) |
|
64
dd6f693e46a1
Cleaning code for using only wxPython 2.6 class naming
lbessard
parents:
58
diff
changeset
|
363 |
|
dd6f693e46a1
Cleaning code for using only wxPython 2.6 class naming
lbessard
parents:
58
diff
changeset
|
364 |
self.TasksGrid = wx.grid.Grid(id=ID_RESOURCEEDITORTASKSGRID, |
27 | 365 |
name='TasksGrid', parent=self, pos=wx.Point(0, 0), |
64
dd6f693e46a1
Cleaning code for using only wxPython 2.6 class naming
lbessard
parents:
58
diff
changeset
|
366 |
size=wx.Size(-1, -1), style=wx.VSCROLL) |
27 | 367 |
self.TasksGrid.SetFont(wx.Font(12, 77, wx.NORMAL, wx.NORMAL, False, |
368 |
'Sans')) |
|
369 |
self.TasksGrid.SetLabelFont(wx.Font(10, 77, wx.NORMAL, wx.NORMAL, |
|
370 |
False, 'Sans')) |
|
113 | 371 |
if wx.VERSION >= (2, 5, 0): |
372 |
self.TasksGrid.Bind(wx.grid.EVT_GRID_CELL_CHANGE, self.OnTasksGridCellChange) |
|
373 |
else: |
|
374 |
wx.grid.EVT_GRID_CELL_CHANGE(self.TasksGrid, self.OnTasksGridCellChange) |
|
375 |
||
391 | 376 |
self.AddTaskButton = wx.Button(id=ID_RESOURCEEDITORADDTASKBUTTON, label=_('Add Task'), |
27 | 377 |
name='AddTaskButton', parent=self, pos=wx.Point(0, 0), |
391 | 378 |
size=wx.DefaultSize, style=0) |
64
dd6f693e46a1
Cleaning code for using only wxPython 2.6 class naming
lbessard
parents:
58
diff
changeset
|
379 |
self.Bind(wx.EVT_BUTTON, self.OnAddTaskButton, id=ID_RESOURCEEDITORADDTASKBUTTON) |
dd6f693e46a1
Cleaning code for using only wxPython 2.6 class naming
lbessard
parents:
58
diff
changeset
|
380 |
|
391 | 381 |
self.DeleteTaskButton = wx.Button(id=ID_RESOURCEEDITORDELETETASKBUTTON, label=_('Delete Task'), |
27 | 382 |
name='DeleteTaskButton', parent=self, pos=wx.Point(0, 0), |
391 | 383 |
size=wx.DefaultSize, style=0) |
64
dd6f693e46a1
Cleaning code for using only wxPython 2.6 class naming
lbessard
parents:
58
diff
changeset
|
384 |
self.Bind(wx.EVT_BUTTON, self.OnDeleteTaskButton, id=ID_RESOURCEEDITORDELETETASKBUTTON) |
dd6f693e46a1
Cleaning code for using only wxPython 2.6 class naming
lbessard
parents:
58
diff
changeset
|
385 |
|
dd6f693e46a1
Cleaning code for using only wxPython 2.6 class naming
lbessard
parents:
58
diff
changeset
|
386 |
self.UpTaskButton = wx.Button(id=ID_RESOURCEEDITORUPTASKBUTTON, label='^', |
27 | 387 |
name='UpTaskButton', parent=self, pos=wx.Point(0, 0), |
388 |
size=wx.Size(32, 32), style=0) |
|
64
dd6f693e46a1
Cleaning code for using only wxPython 2.6 class naming
lbessard
parents:
58
diff
changeset
|
389 |
self.Bind(wx.EVT_BUTTON, self.OnUpTaskButton, id=ID_RESOURCEEDITORUPTASKBUTTON) |
dd6f693e46a1
Cleaning code for using only wxPython 2.6 class naming
lbessard
parents:
58
diff
changeset
|
390 |
|
dd6f693e46a1
Cleaning code for using only wxPython 2.6 class naming
lbessard
parents:
58
diff
changeset
|
391 |
self.DownTaskButton = wx.Button(id=ID_RESOURCEEDITORDOWNTASKBUTTON, label='v', |
27 | 392 |
name='DownTaskButton', parent=self, pos=wx.Point(0, 0), |
393 |
size=wx.Size(32, 32), style=0) |
|
64
dd6f693e46a1
Cleaning code for using only wxPython 2.6 class naming
lbessard
parents:
58
diff
changeset
|
394 |
self.Bind(wx.EVT_BUTTON, self.OnDownTaskButton, id=ID_RESOURCEEDITORDOWNTASKBUTTON) |
dd6f693e46a1
Cleaning code for using only wxPython 2.6 class naming
lbessard
parents:
58
diff
changeset
|
395 |
|
dd6f693e46a1
Cleaning code for using only wxPython 2.6 class naming
lbessard
parents:
58
diff
changeset
|
396 |
self.staticText2 = wx.StaticText(id=ID_RESOURCEEDITORSTATICTEXT2, |
391 | 397 |
label=_(u'Instances:'), name='staticText1', parent=self, |
398 |
pos=wx.Point(0, 0), size=wx.DefaultSize, style=wx.ALIGN_CENTER) |
|
64
dd6f693e46a1
Cleaning code for using only wxPython 2.6 class naming
lbessard
parents:
58
diff
changeset
|
399 |
|
dd6f693e46a1
Cleaning code for using only wxPython 2.6 class naming
lbessard
parents:
58
diff
changeset
|
400 |
self.InstancesGrid = wx.grid.Grid(id=ID_RESOURCEEDITORINSTANCESGRID, |
27 | 401 |
name='InstancesGrid', parent=self, pos=wx.Point(0, 0), |
64
dd6f693e46a1
Cleaning code for using only wxPython 2.6 class naming
lbessard
parents:
58
diff
changeset
|
402 |
size=wx.Size(-1, -1), style=wx.VSCROLL) |
27 | 403 |
self.InstancesGrid.SetFont(wx.Font(12, 77, wx.NORMAL, wx.NORMAL, False, |
404 |
'Sans')) |
|
405 |
self.InstancesGrid.SetLabelFont(wx.Font(10, 77, wx.NORMAL, wx.NORMAL, |
|
406 |
False, 'Sans')) |
|
113 | 407 |
if wx.VERSION >= (2, 5, 0): |
408 |
self.InstancesGrid.Bind(wx.grid.EVT_GRID_CELL_CHANGE, self.OnInstancesGridCellChange) |
|
409 |
else: |
|
410 |
wx.grid.EVT_GRID_CELL_CHANGE(self.InstancesGrid, self.OnInstancesGridCellChange) |
|
411 |
||
391 | 412 |
self.AddInstanceButton = wx.Button(id=ID_RESOURCEEDITORADDINSTANCEBUTTON, label=_('Add Instance'), |
27 | 413 |
name='AddInstanceButton', parent=self, pos=wx.Point(0, 0), |
391 | 414 |
size=wx.DefaultSize, style=0) |
64
dd6f693e46a1
Cleaning code for using only wxPython 2.6 class naming
lbessard
parents:
58
diff
changeset
|
415 |
self.Bind(wx.EVT_BUTTON, self.OnAddInstanceButton, id=ID_RESOURCEEDITORADDINSTANCEBUTTON) |
dd6f693e46a1
Cleaning code for using only wxPython 2.6 class naming
lbessard
parents:
58
diff
changeset
|
416 |
|
391 | 417 |
self.DeleteInstanceButton = wx.Button(id=ID_RESOURCEEDITORDELETEINSTANCEBUTTON, label=_('Delete Instance'), |
27 | 418 |
name='DeleteInstanceButton', parent=self, pos=wx.Point(0, 0), |
391 | 419 |
size=wx.DefaultSize, style=0) |
64
dd6f693e46a1
Cleaning code for using only wxPython 2.6 class naming
lbessard
parents:
58
diff
changeset
|
420 |
self.Bind(wx.EVT_BUTTON, self.OnDeleteInstanceButton, id=ID_RESOURCEEDITORDELETEINSTANCEBUTTON) |
dd6f693e46a1
Cleaning code for using only wxPython 2.6 class naming
lbessard
parents:
58
diff
changeset
|
421 |
|
dd6f693e46a1
Cleaning code for using only wxPython 2.6 class naming
lbessard
parents:
58
diff
changeset
|
422 |
self.UpInstanceButton = wx.Button(id=ID_RESOURCEEDITORUPINSTANCEBUTTON, label='^', |
27 | 423 |
name='UpInstanceButton', parent=self, pos=wx.Point(0, 0), |
424 |
size=wx.Size(32, 32), style=0) |
|
64
dd6f693e46a1
Cleaning code for using only wxPython 2.6 class naming
lbessard
parents:
58
diff
changeset
|
425 |
self.Bind(wx.EVT_BUTTON, self.OnUpInstanceButton, id=ID_RESOURCEEDITORUPINSTANCEBUTTON) |
dd6f693e46a1
Cleaning code for using only wxPython 2.6 class naming
lbessard
parents:
58
diff
changeset
|
426 |
|
dd6f693e46a1
Cleaning code for using only wxPython 2.6 class naming
lbessard
parents:
58
diff
changeset
|
427 |
self.DownInstanceButton = wx.Button(id=ID_RESOURCEEDITORDOWNINSTANCEBUTTON, label='v', |
27 | 428 |
name='DownInstanceButton', parent=self, pos=wx.Point(0, 0), |
429 |
size=wx.Size(32, 32), style=0) |
|
64
dd6f693e46a1
Cleaning code for using only wxPython 2.6 class naming
lbessard
parents:
58
diff
changeset
|
430 |
self.Bind(wx.EVT_BUTTON, self.OnDownInstanceButton, id=ID_RESOURCEEDITORDOWNINSTANCEBUTTON) |
27 | 431 |
|
432 |
self._init_sizers() |
|
433 |
||
121 | 434 |
def __init__(self, parent, tagname, window, controler): |
27 | 435 |
self._init_ctrls(parent) |
436 |
||
90
2245e8776086
Adding support support for using PLCOpenEditor with Beremiz
lbessard
parents:
80
diff
changeset
|
437 |
self.ParentWindow = window |
27 | 438 |
self.Controler = controler |
121 | 439 |
self.TagName = tagname |
27 | 440 |
|
441 |
self.TasksDefaultValue = {"Name" : "", "Single" : "", "Interval" : "", "Priority" : 0} |
|
391 | 442 |
self.TasksTable = ResourceTable(self, [], GetTasksTableColnames()) |
64
dd6f693e46a1
Cleaning code for using only wxPython 2.6 class naming
lbessard
parents:
58
diff
changeset
|
443 |
self.TasksTable.SetColAlignements([wx.ALIGN_LEFT, wx.ALIGN_LEFT, wx.ALIGN_RIGHT, wx.ALIGN_RIGHT]) |
27 | 444 |
self.TasksTable.SetColSizes([200, 100, 100, 100]) |
445 |
self.TasksGrid.SetTable(self.TasksTable) |
|
446 |
self.TasksGrid.SetRowLabelSize(0) |
|
447 |
self.TasksTable.ResetView(self.TasksGrid) |
|
448 |
||
449 |
self.InstancesDefaultValue = {"Name" : "", "Type" : "", "Task" : ""} |
|
391 | 450 |
self.InstancesTable = ResourceTable(self, [], GetInstancesTableColnames()) |
64
dd6f693e46a1
Cleaning code for using only wxPython 2.6 class naming
lbessard
parents:
58
diff
changeset
|
451 |
self.InstancesTable.SetColAlignements([wx.ALIGN_LEFT, wx.ALIGN_LEFT, wx.ALIGN_LEFT]) |
27 | 452 |
self.InstancesTable.SetColSizes([200, 150, 150]) |
453 |
self.InstancesGrid.SetTable(self.InstancesTable) |
|
454 |
self.InstancesGrid.SetRowLabelSize(0) |
|
455 |
self.InstancesTable.ResetView(self.InstancesGrid) |
|
456 |
||
121 | 457 |
def SetTagName(self, tagname): |
458 |
self.TagName = tagname |
|
459 |
||
460 |
def GetTagName(self): |
|
461 |
return self.TagName |
|
462 |
||
463 |
def IsViewing(self, tagname): |
|
464 |
return self.TagName == tagname |
|
465 |
||
407
0a324a874981
Adding support for integrating PLCOpenEditor in Beremiz frame
laurent
parents:
391
diff
changeset
|
466 |
def IsDebugging(self): |
0a324a874981
Adding support for integrating PLCOpenEditor in Beremiz frame
laurent
parents:
391
diff
changeset
|
467 |
return False |
0a324a874981
Adding support for integrating PLCOpenEditor in Beremiz frame
laurent
parents:
391
diff
changeset
|
468 |
|
27 | 469 |
def SetMode(self, mode): |
470 |
pass |
|
471 |
||
472 |
def RefreshTypeList(self): |
|
473 |
self.TypeList = "" |
|
474 |
blocktypes = self.Controler.GetBlockResource() |
|
475 |
for blocktype in blocktypes: |
|
476 |
self.TypeList += ",%s"%blocktype |
|
477 |
||
478 |
def RefreshTaskList(self): |
|
479 |
self.TaskList = "" |
|
480 |
for row in xrange(self.TasksTable.GetNumberRows()): |
|
481 |
self.TaskList += ",%s"%self.TasksTable.GetValueByName(row, "Name") |
|
482 |
||
483 |
def RefreshVariableList(self): |
|
484 |
self.VariableList = "" |
|
121 | 485 |
for variable in self.Controler.GetEditedResourceVariables(self.TagName): |
27 | 486 |
self.VariableList += ",%s"%variable |
487 |
||
488 |
def RefreshModel(self): |
|
121 | 489 |
self.Controler.SetEditedResourceInfos(self.TagName, self.TasksTable.GetData(), self.InstancesTable.GetData()) |
56
7187e1c00975
Adding support for Undo/Redo and Unsaved File On Close detection
lbessard
parents:
27
diff
changeset
|
490 |
self.RefreshBuffer() |
7187e1c00975
Adding support for Undo/Redo and Unsaved File On Close detection
lbessard
parents:
27
diff
changeset
|
491 |
|
7187e1c00975
Adding support for Undo/Redo and Unsaved File On Close detection
lbessard
parents:
27
diff
changeset
|
492 |
def ResetBuffer(self): |
7187e1c00975
Adding support for Undo/Redo and Unsaved File On Close detection
lbessard
parents:
27
diff
changeset
|
493 |
pass |
7187e1c00975
Adding support for Undo/Redo and Unsaved File On Close detection
lbessard
parents:
27
diff
changeset
|
494 |
|
7187e1c00975
Adding support for Undo/Redo and Unsaved File On Close detection
lbessard
parents:
27
diff
changeset
|
495 |
# Buffer the last model state |
7187e1c00975
Adding support for Undo/Redo and Unsaved File On Close detection
lbessard
parents:
27
diff
changeset
|
496 |
def RefreshBuffer(self): |
7187e1c00975
Adding support for Undo/Redo and Unsaved File On Close detection
lbessard
parents:
27
diff
changeset
|
497 |
self.Controler.BufferProject() |
90
2245e8776086
Adding support support for using PLCOpenEditor with Beremiz
lbessard
parents:
80
diff
changeset
|
498 |
self.ParentWindow.RefreshTitle() |
494
c91644c2bfa7
Bug on FileMenu not refreshed when modifications fixed
laurent
parents:
407
diff
changeset
|
499 |
self.ParentWindow.RefreshFileMenu() |
90
2245e8776086
Adding support support for using PLCOpenEditor with Beremiz
lbessard
parents:
80
diff
changeset
|
500 |
self.ParentWindow.RefreshEditMenu() |
27 | 501 |
|
502 |
def RefreshView(self): |
|
121 | 503 |
tasks, instances = self.Controler.GetEditedResourceInfos(self.TagName) |
27 | 504 |
self.TasksTable.SetData(tasks) |
505 |
self.InstancesTable.SetData(instances) |
|
506 |
self.RefreshTypeList() |
|
507 |
self.RefreshTaskList() |
|
508 |
self.RefreshVariableList() |
|
509 |
self.InstancesTable.ResetView(self.InstancesGrid) |
|
510 |
self.TasksTable.ResetView(self.TasksGrid) |
|
511 |
||
145 | 512 |
def RefreshScaling(self, refresh=True): |
513 |
pass |
|
514 |
||
27 | 515 |
def OnAddTaskButton(self, event): |
516 |
self.TasksTable.AppendRow(self.TasksDefaultValue.copy()) |
|
517 |
self.RefreshModel() |
|
145 | 518 |
self.RefreshView() |
27 | 519 |
event.Skip() |
520 |
||
521 |
def OnDeleteTaskButton(self, event): |
|
522 |
row = self.TasksGrid.GetGridCursorRow() |
|
523 |
self.TasksTable.RemoveRow(row) |
|
524 |
self.RefreshModel() |
|
525 |
self.RefreshView() |
|
526 |
event.Skip() |
|
527 |
||
528 |
def OnUpTaskButton(self, event): |
|
529 |
row = self.TasksGrid.GetGridCursorRow() |
|
530 |
self.TasksTable.MoveRow(row, -1, self.TasksGrid) |
|
531 |
self.RefreshModel() |
|
532 |
self.RefreshView() |
|
533 |
event.Skip() |
|
534 |
||
535 |
def OnDownTaskButton(self, event): |
|
536 |
row = self.TasksGrid.GetGridCursorRow() |
|
537 |
self.TasksTable.MoveRow(row, 1, self.TasksGrid) |
|
538 |
self.RefreshModel() |
|
539 |
self.RefreshView() |
|
540 |
event.Skip() |
|
541 |
||
542 |
def OnAddInstanceButton(self, event): |
|
543 |
self.InstancesTable.AppendRow(self.InstancesDefaultValue.copy()) |
|
544 |
self.RefreshModel() |
|
545 |
self.RefreshView() |
|
239
d12779e971bd
Adding support for function and functionBlock (standard or user) library
lbessard
parents:
235
diff
changeset
|
546 |
self.ParentWindow.RefreshInstancesTree() |
27 | 547 |
event.Skip() |
548 |
||
549 |
def OnDeleteInstanceButton(self, event): |
|
550 |
row = self.InstancesGrid.GetGridCursorRow() |
|
551 |
self.InstancesTable.RemoveRow(row) |
|
552 |
self.RefreshModel() |
|
553 |
self.RefreshView() |
|
239
d12779e971bd
Adding support for function and functionBlock (standard or user) library
lbessard
parents:
235
diff
changeset
|
554 |
self.ParentWindow.RefreshInstancesTree() |
27 | 555 |
event.Skip() |
556 |
||
557 |
def OnUpInstanceButton(self, event): |
|
558 |
row = self.InstancesGrid.GetGridCursorRow() |
|
559 |
self.InstancesTable.MoveRow(row, -1, self.InstancesGrid) |
|
560 |
self.RefreshModel() |
|
561 |
self.RefreshView() |
|
239
d12779e971bd
Adding support for function and functionBlock (standard or user) library
lbessard
parents:
235
diff
changeset
|
562 |
self.ParentWindow.RefreshInstancesTree() |
27 | 563 |
event.Skip() |
564 |
||
565 |
def OnDownInstanceButton(self, event): |
|
566 |
row = self.InstancesGrid.GetGridCursorRow() |
|
567 |
self.InstancesTable.MoveRow(row, 1, self.InstancesGrid) |
|
568 |
self.RefreshModel() |
|
569 |
self.RefreshView() |
|
239
d12779e971bd
Adding support for function and functionBlock (standard or user) library
lbessard
parents:
235
diff
changeset
|
570 |
self.ParentWindow.RefreshInstancesTree() |
27 | 571 |
event.Skip() |
572 |
||
573 |
def OnTasksGridCellChange(self, event): |
|
574 |
row, col = event.GetRow(), event.GetCol() |
|
575 |
if self.TasksTable.GetColLabelValue(event.GetCol()) == "Name": |
|
576 |
tasklist = self.TaskList.split(",") |
|
577 |
for i in xrange(self.TasksTable.GetNumberRows()): |
|
578 |
task = self.TasksTable.GetValueByName(i, "Name") |
|
579 |
if task in tasklist: |
|
580 |
tasklist.remove(task) |
|
581 |
tasklist.remove("") |
|
582 |
if len(tasklist) > 0: |
|
583 |
old_name = tasklist[0] |
|
584 |
new_name = self.TasksTable.GetValue(row, col) |
|
585 |
for i in xrange(self.InstancesTable.GetNumberRows()): |
|
586 |
if self.InstancesTable.GetValueByName(i, "Task") == old_name: |
|
587 |
self.InstancesTable.SetValueByName(i, "Task", new_name) |
|
588 |
self.RefreshModel() |
|
589 |
self.RefreshView() |
|
590 |
event.Skip() |
|
591 |
||
592 |
def OnInstancesGridCellChange(self, event): |
|
593 |
self.RefreshModel() |
|
594 |
self.RefreshView() |
|
239
d12779e971bd
Adding support for function and functionBlock (standard or user) library
lbessard
parents:
235
diff
changeset
|
595 |
self.ParentWindow.RefreshInstancesTree() |
27 | 596 |
event.Skip() |
231
fc2d6cbb8b39
Adding support for highlighing compiling errors from matiec
lbessard
parents:
145
diff
changeset
|
597 |
|
fc2d6cbb8b39
Adding support for highlighing compiling errors from matiec
lbessard
parents:
145
diff
changeset
|
598 |
#------------------------------------------------------------------------------- |
fc2d6cbb8b39
Adding support for highlighing compiling errors from matiec
lbessard
parents:
145
diff
changeset
|
599 |
# Errors showing functions |
fc2d6cbb8b39
Adding support for highlighing compiling errors from matiec
lbessard
parents:
145
diff
changeset
|
600 |
#------------------------------------------------------------------------------- |
fc2d6cbb8b39
Adding support for highlighing compiling errors from matiec
lbessard
parents:
145
diff
changeset
|
601 |
|
fc2d6cbb8b39
Adding support for highlighing compiling errors from matiec
lbessard
parents:
145
diff
changeset
|
602 |
def ClearErrors(self): |
fc2d6cbb8b39
Adding support for highlighing compiling errors from matiec
lbessard
parents:
145
diff
changeset
|
603 |
self.TasksTable.ClearErrors() |
fc2d6cbb8b39
Adding support for highlighing compiling errors from matiec
lbessard
parents:
145
diff
changeset
|
604 |
self.InstancesTable.ClearErrors() |
fc2d6cbb8b39
Adding support for highlighing compiling errors from matiec
lbessard
parents:
145
diff
changeset
|
605 |
self.TasksTable.ResetView(self.TasksGrid) |
fc2d6cbb8b39
Adding support for highlighing compiling errors from matiec
lbessard
parents:
145
diff
changeset
|
606 |
self.InstancesTable.ResetView(self.InstancesGrid) |
fc2d6cbb8b39
Adding support for highlighing compiling errors from matiec
lbessard
parents:
145
diff
changeset
|
607 |
|
fc2d6cbb8b39
Adding support for highlighing compiling errors from matiec
lbessard
parents:
145
diff
changeset
|
608 |
def AddShownError(self, infos, start, end): |
fc2d6cbb8b39
Adding support for highlighing compiling errors from matiec
lbessard
parents:
145
diff
changeset
|
609 |
if infos[0] == "task": |
fc2d6cbb8b39
Adding support for highlighing compiling errors from matiec
lbessard
parents:
145
diff
changeset
|
610 |
self.TasksTable.AddError(infos[1:]) |
fc2d6cbb8b39
Adding support for highlighing compiling errors from matiec
lbessard
parents:
145
diff
changeset
|
611 |
elif infos[0] == "instance": |
fc2d6cbb8b39
Adding support for highlighing compiling errors from matiec
lbessard
parents:
145
diff
changeset
|
612 |
self.InstancesTable.AddError(infos[1:]) |
391 | 613 |