I have an issue open in wxFormBuilder, but I am starting to believe that it might be an issue with wxPython instead.
Basically, when I use wxFB to add a splitter panel to my frame, it adds the following code to
the base code.
The generated code:
def m_splitter2OnIdle( self, event ):
self.m_splitter2.SetSashPosition( 0 )
self.m_splitter2.Unbind( wx.EVT_IDLE )
The problem which alerted me to this issue was a crash when I exit the app.
the rport:
Traceback (most recent call last):
File "d:\pkg\python\wxFB\wxPython\wpMeta\wpMetaBase.py", line 170, in m_splitter2OnIdle
self.m_splitter2.SetSashPosition( 0 )
RuntimeError: wrapped C/C++ object of type SplitterWindow has been deleted
is repeated 5 times when the app exits.
However, meanwhile I have run more tests and it looks like the call to unbind never disconnects the handler.
When I monitor the code’s executing in VSCode, the handler gets called over and over, not just the first time it is invoked.
As well I have meanwhile found another very similar question on stackoverflow:
event handling - wxPython Unbind method returns True but doesn't Unbind - Stack Overflow