[wxpython-users] destroy that window, NOW!

raffaello barbarossa.platz at gmail.com
Tue May 6 11:23:57 PDT 2008


This problem arises with secondary frames, opened on the fly, closed and
then reopened: I get this kind of message error:
  File "C:\Python_programs\Conti correnti\buildconti\out1.pyz/wx._core",
line 14318, in __getattr__
wx._core.PyDeadObjectError: The C++ part of the StaticText object has been
deleted, attribute access no longer allowed.

My workaround so far has been to MOVE the secondary frame to
wx.Point(-10000, -10000): it works and  is very fast, but obviously no
memory is released.

Thanks


2008/5/6 Robin Dunn <robin at alldunn.com>:

> raffaello wrote:
>
> > The command wx.Window.Destroy() does not destroys the window at once,
> > but adds it to a list to be deleted on idle time.
> > But if one needs not be encumbered by flotsam and jetsam of windows not
> > yet destroyed, is there a command that obliterate them immediately or t=
ells
> > the application to wait until the actual destruction has been carried o=
ut?
> >
>
> First, it's only the top-level windows (frames and dialogs) that have this
> delayed destruction feature, the others are destroyed immediately. It's
> possible that might change someday, but I doubt it.
>
> Second, what exactly is the problem with having them stick around for a
> few milliseconds?  Would hiding them before the Destroy solve it for you?
>
> --
> Robin Dunn
> Software Craftsman
> http://wxPython.org  Java give you jitters?  Relax with wxPython!
>
> _______________________________________________
> wxpython-users mailing list
> wxpython-users at lists.wxwidgets.org
> http://lists.wxwidgets.org/mailman/listinfo/wxpython-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.wxwidgets.org/pipermail/wxpython-users/attachments/200805=
06/53ad6fc7/attachment.htm


More information about the wxpython-users mailing list