i18n/app.fil
author Andrey Skvortsov <andrej.skvortzov@gmail.com>
Mon, 13 Aug 2018 18:29:07 +0300
changeset 2284 64bb520009f3
parent 2186 2ec02f0f9fa9
child 2426 aef7f2ca4e69
permissions -rw-r--r--
Fix wxHMI example after upgrading wxGlade

Newer wxGlade generates code to initialize GridSizer's with empty
elements.

...
grid_sizer_1.Add(self.window_1, 1, wx.ALIGN_CENTER, 0)
sizer_2.Add((0, 0), 0, 0, 0)
sizer_2.Add((0, 0), 0, 0, 0)
sizer_2.Add((0, 0), 0, 0, 0)
sizer_2.Add((0, 0), 0, 0, 0)
...

That causes following traceback, if new buttons are added
to already full sizer.

PLCobject : Traceback (most recent call last):

File "./Beremiz_service.py", line 389, in default_evaluator
res = (tocall(*args, **kwargs), None)

File "/tmp/tmpQS8ct2/runtime_0.py", line 540, in _runtime_0_start
wx.MessageBox(_("Please stop PLC to close"))

File "/tmp/tmpQS8ct2/runtime_0.py", line 504, in Init
lambda axis:( MakeButtonFunc(self, sizer, axis+"axisMinus"),

File "/tmp/tmpQS8ct2/runtime_0.py", line 502, in <lambda>
lambda btname: MakeButtonFunc(self, sizer, btname), ActionButtons)

File "/tmp/tmpQS8ct2/runtime_0.py", line 461, in MakeButtonFunc
print sizer, btname

File "/usr/lib/python2.7/dist-packages/wx-3.0-gtk3/wx/_core.py", line 14453, in Add
return _core_.Sizer_Add(*args, **kwargs)

PyAssertionError: C++ assertion "Assert failure" failed at
../src/common/sizer.cpp(1401) in DoInsert(): too many items (11 > 2*5)
in grid sizer (maybe you should omit the number of either rows or
columns?)


Tested with wxGlade version 0.8.3
Closes #41
../canfestival/canfestival.py
../canfestival/SlaveEditor.py
../canfestival/config_utils.py
../canfestival/NetworkEditor.py
../BeremizIDE.py
../dialogs/LDElementDialog.py
../dialogs/ForceVariableDialog.py
../dialogs/SearchInProjectDialog.py
../dialogs/SFCStepDialog.py
../dialogs/SFCStepNameDialog.py
../dialogs/FindInPouDialog.py
../dialogs/SFCDivergenceDialog.py
../dialogs/SFCTransitionDialog.py
../dialogs/DurationEditorDialog.py
../dialogs/PouTransitionDialog.py
../dialogs/FBDVariableDialog.py
../dialogs/BlockPreviewDialog.py
../dialogs/AboutDialog.py
../dialogs/ProjectDialog.py
../dialogs/LDPowerRailDialog.py
../dialogs/ArrayTypeDialog.py
../dialogs/PouNameDialog.py
../dialogs/BrowseLocationsDialog.py
../dialogs/FBDBlockDialog.py
../dialogs/ConnectionDialog.py
../dialogs/BrowseValuesLibraryDialog.py
../dialogs/ActionBlockDialog.py
../dialogs/PouActionDialog.py
../dialogs/DiscoveryDialog.py
../dialogs/PouDialog.py
../graphics/RubberBand.py
../graphics/FBD_Objects.py
../graphics/DebugDataConsumer.py
../graphics/ToolTipProducer.py
../graphics/LD_Objects.py
../graphics/SFC_Objects.py
../graphics/GraphicCommons.py
../connectors/PYRO/__init__.py
../connectors/PYRO/dialog.py
../connectors/__init__.py
../connectors/WAMP/__init__.py
../connectors/WAMP/dialog.py
../targets/Generic/XSD
../targets/XSD_toolchain_makefile
../targets/Xenomai/__init__.py
../targets/Xenomai/XSD
../targets/XSD_toolchain_gcc
../targets/__init__.py
../targets/toolchain_gcc.py
../targets/toolchain_makefile.py
../targets/Linux/XSD
../targets/Win32/XSD
../PLCControler.py
../PLCOpenEditor.py
../py_ext/PythonEditor.py
../py_ext/PythonFileCTNMixin.py
../wxglade_hmi/wxglade_hmi.py
../modbus/modbus.py
../runtime/NevowServer.py
../runtime/WampClient.py
../runtime/PLCObject.py
../runtime/ServicePublisher.py
../ConfigTreeNode.py
../editors/ConfTreeNodeEditor.py
../editors/ResourceEditor.py
../editors/Viewer.py
../editors/LDViewer.py
../editors/DataTypeEditor.py
../editors/IECCodeViewer.py
../editors/TextViewer.py
../editors/ProjectNodeEditor.py
../editors/EditorPanel.py
../editors/DebugViewer.py
../editors/SFCViewer.py
../editors/FileManagementPanel.py
../editors/CodeFileEditor.py
../ProjectController.py
../controls/LocationCellEditor.py
../controls/SearchResultPanel.py
../controls/PouInstanceVariablesPanel.py
../controls/CustomTable.py
../controls/EnhancedStatusBar.py
../controls/LibraryPanel.py
../controls/UriLocationEditor.py
../controls/CustomToolTip.py
../controls/LogViewer.py
../controls/FolderTree.py
../controls/ProjectPropertiesPanel.py
../controls/DebugVariablePanel/DebugVariablePanel.py
../controls/DebugVariablePanel/DebugVariableViewer.py
../controls/DebugVariablePanel/DebugVariableTextViewer.py
../controls/DebugVariablePanel/DebugVariableGraphicViewer.py
../controls/DebugVariablePanel/GraphButton.py
../controls/DebugVariablePanel/DebugVariableItem.py
../controls/TextCtrlAutoComplete.py
../controls/DurationCellEditor.py
../controls/CustomStyledTextCtrl.py
../controls/VariablePanel.py
../controls/CustomGrid.py
../controls/CustomIntCtrl.py
../controls/CustomTree.py
../controls/CustomEditableListBox.py
../CodeFileTreeNode.py
../docutil/dochtml.py
../c_ext/CFileEditor.py
../xmlclass/xsdschema.py
../xmlclass/xmlclass.py
../Beremiz.py
../version.py
../POULibrary.py
../util/MiniTextControler.py
../util/ExceptionHandler.py
../util/misc.py
../util/ProcessLogger.py
../features.py
../svgui/svgui.py
../svgui/svgui_server.py
../svgui/svguilib.py
../plcopen/InstancesPathCollector.py
../plcopen/types_enums.py
../plcopen/InstanceTagnameCollector.py
../plcopen/BlockInstanceCollector.py
../plcopen/iec_std.csv
../plcopen/structures.py
../plcopen/XSLTModelQuery.py
../plcopen/POUVariablesCollector.py
../plcopen/VariableInfoCollector.py
../plcopen/plcopen.py
../plcopen/definitions.py
../IDEFrame.py
../PLCGenerator.py
../Beremiz_service.py
../plcopen/Additional_Function_Blocks.xml
../plcopen/Standard_Function_Blocks.xml