Fit() --> A division by zero

Win2000 / wxPython 2.5.2.8

I just installed wxPython 2.5.2.8 and the latest version of wxGlade. The code generated by wxGlade 0.3.4 crashes when Fit(panel) is called. I have attached the file you may run it to see where it crashes... what is going wrong here?

Regards,
Marco

sorry forgot:

_fam_hwm_gui.py (8.04 KB)

···

On Tue, 31 Aug 2004 10:23:32 +0200, Marco Aschwanden <PPNTWIMBXFFC@spammotel.com> wrote:

Win2000 / wxPython 2.5.2.8
I have attached the file you may run it to see where it crashes... what is going wrong here?

It appears to be something wrong with maybe
wx.grid.Grid(...)

try replacing:

self.gridHwm = wx.grid.Grid(self.panelMain, -1)
with
self.gridHwm = wx.grid.Grid(self.panelMain, -1, size=(1,1))
around line 42

Also... consider declaring unicode strings... maybe something like:
u"Löschen" instead "Löschen" (I wasn't able to actualy run the script because of this)

···

On Tue, 31 Aug 2004 10:23:32 +0200, Marco Aschwanden <PPNTWIMBXFFC@spammotel.com> wrote:

Win2000 / wxPython 2.5.2.8

I just installed wxPython 2.5.2.8 and the latest version of wxGlade. The code generated by wxGlade 0.3.4 crashes when Fit(panel) is called. I have attached the file you may run it to see where it crashes... what is going wrong here?

--
Peter Damoc
Hacker Wannabe
http://www.sigmacore.net/

When doing this change it works! I will report it to wxGlade. But is this a bug or a feature? Why does wx.Grid now require a size and other widgets don't?

Thanks a lot (you are a real day-saver),
Marco

···

On Tue, 31 Aug 2004 13:01:03 +0300, Peter Damoc <pdamoc@gmx.net> wrote:

try replacing:

self.gridHwm = wx.grid.Grid(self.panelMain, -1)
with
self.gridHwm = wx.grid.Grid(self.panelMain, -1, size=(1,1))
around line 42

Marco Aschwanden wrote:

···

On Tue, 31 Aug 2004 13:01:03 +0300, Peter Damoc <pdamoc@gmx.net> wrote:

try replacing:

self.gridHwm = wx.grid.Grid(self.panelMain, -1)
with
self.gridHwm = wx.grid.Grid(self.panelMain, -1, size=(1,1))
around line 42

When doing this change it works! I will report it to wxGlade. But is this a bug or a feature? Why does wx.Grid now require a size and other widgets don't?

It's a bug. I've just fixed it.

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!