[wxPython-dev] 20070511 test build uploaded

Waldemar Osuch waldemar.osuch at gmail.com
Tue May 15 11:45:52 PDT 2007


> Yes, this is a known issue.  Basically as the tree is destroyed each
> item is removed, and if the item is selected then another will be
> selected so the first can be removed, and then another, etc.  A
> selection event will be sent each time it is changed.
>
> The workaround is easy.  You can just test the widget:
>
>         if self.dirctrl:
>                 print self.dirctrl.Path
>
> or you can check if the deletion is in progress:
>
>         if not self.IsBeingDestroyed():
>                 print self.dirctrl.Path
>

Yes, thank you.  The deletion check works nicely.
Just for the benefit of people searching the archives the method name
I have ended up using is:

if not self.IsBeingDeleted():
    print self.dirctrl.Path




More information about the wxpython-dev mailing list