[wxPython] wxTreeCtrl.GetParent breaks wxWindow.GetParent

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

[wxPython] wxTreeCtrl.GetParent breaks wxWindow.GetParent

Riaan Booysen
Hello Robin

wxTreeCtrl's GetParent method returns the parent of a given TreeItemId
but unfortunately hides wxWindows' GetParent method. The C++ version
I think handles this through parameter overloading but you'll probably
have to SWIG wxTreeCtr.GetParent to wxTreeCtrl.GetItemParent or
something.

Could this also explain the core dumps I've been getting on destroying
wxTreeCtrls?

Riaan Booysen

_______________________________________________
wxPython-users maillist  -  [hidden email]
http://starship.python.net/mailman/listinfo/wxpython-users



Reply | Threaded
Open this post in threaded view
|

Re: [wxPython] wxTreeCtrl.GetParent breaks wxWindow.GetParent

Robin Dunn
> Hello Robin
>
> wxTreeCtrl's GetParent method returns the parent of a given TreeItemId
> but unfortunately hides wxWindows' GetParent method. The C++ version
> I think handles this through parameter overloading but you'll probably
> have to SWIG wxTreeCtr.GetParent to wxTreeCtrl.GetItemParent or
> something.

Thanks for noticing this.  It's now fixed for the next release.


>
> Could this also explain the core dumps I've been getting on destroying
> wxTreeCtrls?
>

Probably not.  How are you destroying it?

--
Robin Dunn
Software Craftsman
[hidden email]
http://AllDunn.com/robin/
http://AllDunn.com/wxPython/  Check it out!






_______________________________________________
wxPython-users maillist  -  [hidden email]
http://starship.python.net/mailman/listinfo/wxpython-users



Reply | Threaded
Open this post in threaded view
|

Re: [wxPython] wxTreeCtrl.GetParent breaks wxWindow.GetParent

Riaan Booysen
In reply to this post by Riaan Booysen
> > Could this also explain the core dumps I've been getting on
destroying
> > wxTreeCtrls?
> >
>
> Probably not.  How are you destroying it?
>

The usual: control.Destroy().
I'm dynamically adding/removing pages from a wxNotebook and sometimes
when
closing a page that hosts a wxTreeCtrl it core dumps.

Riaan Booysen

_______________________________________________
wxPython-users maillist  -  [hidden email]
http://starship.python.net/mailman/listinfo/wxpython-users



Reply | Threaded
Open this post in threaded view
|

Re: [wxPython] wxTreeCtrl.GetParent breaks wxWindow.GetParent

Robin Dunn
> > > Could this also explain the core dumps I've been getting on
> destroying
> > > wxTreeCtrls?
> > >
> >
> > Probably not.  How are you destroying it?
> >
>
> The usual: control.Destroy().
> I'm dynamically adding/removing pages from a wxNotebook and sometimes
> when
> closing a page that hosts a wxTreeCtrl it core dumps.
>

More likley that there is something that is being deleted twice or possibly
some events for the tree that havn't been processed yet...  If you can
whittle it down to a small sample that duplicates the problem I would
appreciate it.

--
Robin Dunn
Software Craftsman
[hidden email]
http://AllDunn.com/robin/
http://AllDunn.com/wxPython/  Check it out!



_______________________________________________
wxPython-users maillist  -  [hidden email]
http://starship.python.net/mailman/listinfo/wxpython-users



Reply | Threaded
Open this post in threaded view
|

Re: [wxPython] wxTreeCtrl.GetParent breaks wxWindow.GetParent

Riaan Booysen


Robin Dunn wrote:

>
> > > > Could this also explain the core dumps I've been getting on
> > destroying
> > > > wxTreeCtrls?
> > > >
> > >
> > > Probably not.  How are you destroying it?
> > >
> >
> > The usual: control.Destroy().
> > I'm dynamically adding/removing pages from a wxNotebook and sometimes
> > when
> > closing a page that hosts a wxTreeCtrl it core dumps.
> >
>
> More likley that there is something that is being deleted twice or possibly
> some events for the tree that havn't been processed yet...  If you can
> whittle it down to a small sample that duplicates the problem I would
> appreciate it.
>

Small samples work great, it must be me.

Riaan Booysen

_______________________________________________
wxPython-users maillist  -  [hidden email]
http://starship.python.net/mailman/listinfo/wxpython-users