I have code that was working for me earlier today but now (perhaps because my computer is less busy) is generating a segmentation fault when the .Raise() is called.
The gist of the code where this occurs is this:
dlg2 = wx.MessageDialog(self.GetTopLevelParent(),text,header,wx.OK|wx.CANCEL)
dlg2.CenterOnParent()
dlg2.Raise() # crashes here on Mac (sometimes?)
try:
if dlg2.ShowModal() == wx.ID_OK: pass
finally:
dlg2.Destroy()
It seg faults on the .Raise() and runs fine if that commented out. I am not 100% sure why added the .Raise() (probably because the dialog was getting hidden), and I can live without it, but I’d really like to understand what would cause this. Also, FWIW, the CenterOnParent() is not moving the window on top of the parent.
I see this on a Mac and with wx 4.0.4 and 4.1.1.
Brian