What will happen if you treat MessageDialog as if it is say FileDialog or similar?
import wx
class MyApp(wx.App):
def __init__(self):
wx.App.__init__(self, redirect=False)
def OnInit(self):
self.rootView = wx.Frame(parent=None, id=-1, title="Wire Frame",
pos=(150, 150), size=(350, 250))
self.rootView.Show()
self.SetTopWindow(self.rootView)
dlg = wx.MessageDialog(self.rootView, "Hi", "title", wx.OK|wx.ICON_ERROR)
#dlg.ShowModal()
if dlg.ShowModal() != wx.ID_OK:
dlg.Destroy()
return True
if __name__ == "__main__":
app = MyApp()
app.MainLoop()
probably just a hackish way to go around but this may work...
At least, this seems to work in the same way in wxpyhon2.8 on Windows.