tests/wxGlade/HMIFrame@wxglade_hmi/hmi.wxg
author Andrey Skvortsov <andrej.skvortzov@gmail.com>
Fri, 25 May 2018 17:23:15 +0300
changeset 2166 5ce6d08ff2c7
parent 1690 cfac9d1c3571
permissions -rw-r--r--
make clipboard open minimal time as wxPython documentation recommends

https://wxpython.org/Phoenix/docs/html/wx.Clipboard.html#wx.Clipboard.GetData

"Call wx.Clipboard.Open to get ownership of the clipboard. If this
operation returns True, you now own the clipboard. Call
wx.Clipboard.SetData to put data on the clipboard, or
wx.Clipboard.GetData to retrieve data from the clipboard. Call
wx.Clipboard.Close to close the clipboard and relinquish ownership.
You should keep the clipboard open only momentarily."

Maybe it makes situation with pretty annoying error 'clipboard already
open' a little bit better.

traceback:
File "/home/developer/WorkData/PLC/beremiz/avangard-beremiz-ide/src/../../beremiz/BeremizIDE.py", line 955, in OnSaveProjectMenu
self.RefreshAfterSave()
File "/home/developer/WorkData/PLC/beremiz/avangard-beremiz-ide/src/../../beremiz/BeremizIDE.py", line 946, in RefreshAfterSave
self._Refresh(TITLE, FILEMENU, EDITMENU, PAGETITLES)
File "/home/developer/WorkData/PLC/beremiz/avangard-beremiz-ide/src/../../beremiz/IDEFrame.py", line 926, in _Refresh
self.RefreshFunctions[element]()
File "/home/developer/WorkData/PLC/beremiz/avangard-beremiz-ide/src/../../beremiz/BeremizIDE.py", line 766, in RefreshEditMenu
IDEFrame.RefreshEditMenu(self)
File "/home/developer/WorkData/PLC/beremiz/avangard-beremiz-ide/src/../../beremiz/IDEFrame.py", line 1185, in RefreshEditMenu
if self.GetCopyBuffer() is not None:
File "/home/developer/WorkData/PLC/beremiz/avangard-beremiz-ide/src/../../beremiz/IDEFrame.py", line 956, in GetCopyBuffer
if wx.TheClipboard.Open():
File "/usr/lib/python2.7/dist-packages/wx-3.0-gtk3/wx/_misc.py", line 5793, in Open
return _misc_.Clipboard_Open(*args, **kwargs)
<class 'wx._core.PyAssertionError'>: C++ assertion "!m_open" failed at ../src/gtk/clipbrd.cpp(598) in Open(): clipboard already open
411
8261c8f1e365 Bug on Debug trying to start (and stop) before PLC started fixed.
laurent
parents:
diff changeset
     1
<?xml version="1.0"?>
1690
cfac9d1c3571 cleanup wxGlade example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 728
diff changeset
     2
<!-- generated by wxGlade 0.7.2 on Mon Jun  5 14:18:29 2017 -->
411
8261c8f1e365 Bug on Debug trying to start (and stop) before PLC started fixed.
laurent
parents:
diff changeset
     3
1690
cfac9d1c3571 cleanup wxGlade example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 728
diff changeset
     4
<application class="" encoding="UTF-8" for_version="2.8" header_extension=".h" indent_amount="4" indent_symbol="space" is_template="0" language="python" name="" option="0" overwrite="0" path="..py.py" source_extension=".cpp" top_window="HMIFrame" use_gettext="0" use_new_namespace="1">
411
8261c8f1e365 Bug on Debug trying to start (and stop) before PLC started fixed.
laurent
parents:
diff changeset
     5
    <object class="Class_HMIFrame" name="HMIFrame" base="EditFrame">
8261c8f1e365 Bug on Debug trying to start (and stop) before PLC started fixed.
laurent
parents:
diff changeset
     6
        <style>wxDEFAULT_FRAME_STYLE</style>
8261c8f1e365 Bug on Debug trying to start (and stop) before PLC started fixed.
laurent
parents:
diff changeset
     7
        <title>HMIFrame</title>
8261c8f1e365 Bug on Debug trying to start (and stop) before PLC started fixed.
laurent
parents:
diff changeset
     8
        <object class="wxBoxSizer" name="sizer_1" base="EditBoxSizer">
8261c8f1e365 Bug on Debug trying to start (and stop) before PLC started fixed.
laurent
parents:
diff changeset
     9
            <orient>wxVERTICAL</orient>
8261c8f1e365 Bug on Debug trying to start (and stop) before PLC started fixed.
laurent
parents:
diff changeset
    10
            <object class="sizeritem">
8261c8f1e365 Bug on Debug trying to start (and stop) before PLC started fixed.
laurent
parents:
diff changeset
    11
                <border>0</border>
8261c8f1e365 Bug on Debug trying to start (and stop) before PLC started fixed.
laurent
parents:
diff changeset
    12
                <option>0</option>
8261c8f1e365 Bug on Debug trying to start (and stop) before PLC started fixed.
laurent
parents:
diff changeset
    13
                <object class="wxSpinCtrl" name="spin_ctrl_1" base="EditSpinCtrl">
8261c8f1e365 Bug on Debug trying to start (and stop) before PLC started fixed.
laurent
parents:
diff changeset
    14
                    <range>0, 10000</range>
8261c8f1e365 Bug on Debug trying to start (and stop) before PLC started fixed.
laurent
parents:
diff changeset
    15
                </object>
8261c8f1e365 Bug on Debug trying to start (and stop) before PLC started fixed.
laurent
parents:
diff changeset
    16
            </object>
8261c8f1e365 Bug on Debug trying to start (and stop) before PLC started fixed.
laurent
parents:
diff changeset
    17
            <object class="sizeritem">
8261c8f1e365 Bug on Debug trying to start (and stop) before PLC started fixed.
laurent
parents:
diff changeset
    18
                <border>0</border>
8261c8f1e365 Bug on Debug trying to start (and stop) before PLC started fixed.
laurent
parents:
diff changeset
    19
                <option>0</option>
8261c8f1e365 Bug on Debug trying to start (and stop) before PLC started fixed.
laurent
parents:
diff changeset
    20
                <object class="wxCheckBox" name="checkbox_1" base="EditCheckBox">
8261c8f1e365 Bug on Debug trying to start (and stop) before PLC started fixed.
laurent
parents:
diff changeset
    21
                    <label>checkbox_1</label>
8261c8f1e365 Bug on Debug trying to start (and stop) before PLC started fixed.
laurent
parents:
diff changeset
    22
                </object>
8261c8f1e365 Bug on Debug trying to start (and stop) before PLC started fixed.
laurent
parents:
diff changeset
    23
            </object>
8261c8f1e365 Bug on Debug trying to start (and stop) before PLC started fixed.
laurent
parents:
diff changeset
    24
            <object class="sizeritem">
8261c8f1e365 Bug on Debug trying to start (and stop) before PLC started fixed.
laurent
parents:
diff changeset
    25
                <border>0</border>
8261c8f1e365 Bug on Debug trying to start (and stop) before PLC started fixed.
laurent
parents:
diff changeset
    26
                <option>0</option>
8261c8f1e365 Bug on Debug trying to start (and stop) before PLC started fixed.
laurent
parents:
diff changeset
    27
                <object class="wxStaticText" name="label_1" base="EditStaticText">
8261c8f1e365 Bug on Debug trying to start (and stop) before PLC started fixed.
laurent
parents:
diff changeset
    28
                    <attribute>1</attribute>
1690
cfac9d1c3571 cleanup wxGlade example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 728
diff changeset
    29
                    <label>GUI changed!</label>
411
8261c8f1e365 Bug on Debug trying to start (and stop) before PLC started fixed.
laurent
parents:
diff changeset
    30
                </object>
8261c8f1e365 Bug on Debug trying to start (and stop) before PLC started fixed.
laurent
parents:
diff changeset
    31
            </object>
8261c8f1e365 Bug on Debug trying to start (and stop) before PLC started fixed.
laurent
parents:
diff changeset
    32
        </object>
8261c8f1e365 Bug on Debug trying to start (and stop) before PLC started fixed.
laurent
parents:
diff changeset
    33
    </object>
8261c8f1e365 Bug on Debug trying to start (and stop) before PLC started fixed.
laurent
parents:
diff changeset
    34
</application>