Re: wx.lib.agw.aui.AuiNotebook => Tab drag/drop bug
Harald Hanöfner <[email protected]>
| Newsgroups | gmane.comp.python.wxpython.devel |
|---|---|
| Message-ID | <[email protected]> |
I checked the problem also with the new demo on https://github.com/wxWidgets/Phoenix. If you start the "AUI test frame" from the demo and you try dragging the tabs, the same bug appears => self.ReleaseMouse() raise an wx._core.wxAssertionError ... Am Samstag, 26. November 2016 06:57:12 UTC+1 schrieb Harald Hanöfner: > > I agree. But the problem is within the wxPython (Phoenix) package. And the > same code works fine with the Classic version, but not with the phoenix > version. I don't no what I have to do? > > Am Donnerstag, 24. November 2016 20:14:05 UTC+1 schrieb Eric Fahlgren: >> >> Hmm, I have some code that does mouse capture, and I couldn't get >> HasCapture to work either (written maybe 10 years ago??? never re-examined >> it). I just added a "self.captured" state, changing it explicitly when I >> capture and release, then added an event handler to change the state when I >> don't get that explicit enter/leave event. I suspect HasCapture is missing >> something like this? >> >> >>> self.Bind(wx.EVT_MOUSE_CAPTURE_LOST, self.OnCaptureLost) >> >> >> On Thu, Nov 24, 2016 at 9:48 AM, Harald Hanöfner <[email protected]> >> wrote: >> >>> If you want drag-and-drop a tab of a wx.lib.agw.aui.AuiNotebook the >>> application hangs after releasing the left mouse and the following error >>> message occurs. >>> (Environment: Python 3.5.2 | >>> wxPython_Phoenix-3.0.3.dev2680+55dda48-cp35-cp35m-win32.whl | Windows 10) >>> >>> Traceback (most recent call last): >>> File "C:\Program Files (x86)\Python >>> 3.5\lib\site-packages\wx\lib\agw\aui\auibook.py", line 2023, in OnLeftUp >>> self.ReleaseMouse() >>> wx._core.wxAssertionError: C++ assertion >>> "!wxMouseCapture::stack.empty()" failed at ..\..\src\common\wincmn.cpp( >>> 3319) in wxWindowBase::ReleaseMouse(): Releasing mouse capture but >>> capture stack empty? >>> >>> When I look into the code I see the following there: >>> >>> 2022 if self.HasCapture(): >>> 2023 self.ReleaseMouse() >>> >>> Very surprising, because the mouse releasing is checked before the >>> call!? I have no idea why that exception raised. With python 2.7 and >>> wxPython 3.0.2.0 this code makes no problems. >>> >>> A similar problem I have sometimes when I move the whole application >>> window. Then I get the following error message. >>> >>> Traceback (most recent call last): >>> File "C:\Program Files (x86)\Python >>> 3.5\lib\site-packages\wx\lib\agw\aui\framemanager.py", line 9219, in >>> OnLeftUp >>> self._frame.ReleaseMouse() >>> wx._core.wxAssertionError: C++ assertion >>> "!wxMouseCapture::stack.empty()" failed at ..\..\src\common\wincmn.cpp( >>> 3319) in wxWindowBase::ReleaseMouse(): Releasing mouse capture but >>> capture stack empty? >>> >>> But that error only appears very seldom and not predictable. But the >>> problem is the same as above => with calling the method ReleaseMouse() >>> despite of a previous HasCapture() check. >>> >>> Hope somebody can help me. Thanks! >>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "wxPython-dev" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to [email protected]. >>> For more options, visit https://groups.google.com/d/optout. >>> >> >> -- You received this message because you are subscribed to the Google Groups "wxPython-dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.