[wxPython-dev] 2.7's properties and class definition order
Robin Dunn
robin at alldunn.com
Thu Oct 26 11:03:24 PDT 2006
Paul McNett wrote:
> Ok, I went ahead and reordered the class definitions, so where I used to
> have:
>
> class dForm(wx.Frame, dabo.dPemMixin):
>
> I now have:
>
> class dForm(dabo.dPemMixin, wx.Frame):
>
> and it seems to be working.
>
> Most of my apps now work fine, however in one of my apps I'm seeing this:
>
> File "/home/pmcnett/projects/py/timetracker/ui/FrmBase.py", line 15,
> in setupMenu
> self.fillReportsMenu()
> File "/home/pmcnett/projects/py/timetracker/ui/FrmBase.py", line 152,
> in fillReportsMenu
> menu.remove(idx)
> File "/home/pmcnett/projects/dabo/dabo/ui/uiwx/dMenu.py", line 231, in
> remove
> item.Destroy()
> File
> "/usr/lib/python2.4/site-packages/wx-2.7.1-gtk2-unicode/wx/_core.py",
> line 708, in Destroy
> args[0].this.own(False)
> AttributeError: 'MenuItem' object has no attribute 'own'
It is a bug that causes the self.this object to be set incorrectly. (A
SWIG typemap is used when it probably shouldn't be.) I fixed a similar
problem for wx.ImageList a few days ago, and I planned on checking the
other types that also use a similar typemap, but it slipped my mind.
I've now done it for 2.7.1.3.
>
> I *think* this must be a typo in wx/_core (isn't it usually 'thisown'
> and not 'this.own'?)
The thisown attribute is now a property that maps to the this.own method.
>
> I'm also seeing this new message occasionally:
>
> swig/python detected a memory leak of type 'wxStopWatch *', no
> destructor found.
Thanks. This is easily fixed.
--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!
More information about the wxpython-dev
mailing list