I've recently upgraded to wxPython 2.5.1.5 by installing the binary
file wxPythonGTK2-py2.3-2.5.1.5-1.i386.rpm from the wxPython website
(since I'm on Slackware, I actually installed it as a tgz package
after doing an rpm2tgz conversion -- however, everything looks like it
installed properly).
I'm having a problem with code generated by wxDesigner (latest
version, 2.9d). If I create a simple test app with just a frame and
the generic menu items, I get a segmentation fault when clicking on
the 'File -> About' menu item, with the following error message displayed:
Here's the code that wxDesigner generated for the function OnAbout:
def OnAbout(self, event):
dialog = wxMessageDialog(self,"Welcome to SuperApp 1.0\n(C)opyright Joe Hacker",
"About SuperApp", wxOK|wxICON_INFORMATION )
dialog.CentreOnParent()
dialog.ShowModal()
dialog.Destroy()
Any idea on why this code is no good??
I'm still very much a wxPython newbie, and I'm hoping to use
wxDesigner as a learning tool. However, this appears to be a
fundamental incompatibility between wxPython 2.5.1.5 and wxDesigner
2.9d.
Here's the code that wxDesigner generated for the function OnAbout:
def OnAbout(self, event):
dialog = wxMessageDialog(self,"Welcome to SuperApp 1.0\n(C)opyright Joe Hacker",
"About SuperApp", wxOK|wxICON_INFORMATION )
dialog.CentreOnParent()
dialog.ShowModal()
dialog.Destroy()
Any idea on why this code is no good??
I'm still very much a wxPython newbie, and I'm hoping to use
wxDesigner as a learning tool. However, this appears to be a
fundamental incompatibility between wxPython 2.5.1.5 and wxDesigner
2.9d.
Actually it is not. It is crashing for me in CenterOnParent, at least with the GTK2 version, is that what you are using? I've noticed another issue with wx.MessageDialog and I think it has to do with wxGTK switching from a generic to a native dialog...
···
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!
Actually it is not. It is crashing for me in CenterOnParent, at least
with the GTK2 version, is that what you are using? I've noticed
another issue with wx.MessageDialog and I think it has to do with
wxGTK switching from a generic to a native dialog...
Robin,
Yes, I'm using the GTK2 version. Specifically, the binary you provide
on your website. If you're having the same problem, I guess that my
recompiling from source wouldn't help matters?