私のコード
def myCaller(self, event):
wx.CallAfter(self.msgbox(0.3434, 0.34, 0.121))
def msgbox(self, val, f1, f2):
message = "Node Failure Probability: %f \nLeft Child Value: %f \nRight Child Value: %f" % (val, f1, f2)
dlg = wx.MessageDialog(self, message, "Node Information", wx.OK)
dlg.showmodal()
dlg.Destroy()
出力は問題なく出力されますが、シェルでエラーが発生します。
dlg.ShowModal()
File "C:\Python27\lib\site-packages\wx-2.8-msw-unicode\wx\_windows.py", line 711, in ShowModal
return _windows_.Dialog_ShowModal(*args, **kwargs)
wx._core.PyAssertionError: C++ assertion "wxAssertFailure" failed at ..\..\src\common\wincmn.cpp(2571) in DoNotifyWindowAboutCaptureLost(): window that captured the mouse didn't process wxEVT_MOUSE_CAPTURE_LOST
どこが間違っていますか?前もって感謝します!