Chris Mahoney wrote:
What am I missing? According to the documentation,
"wxTreeCtrl::GetSelection...Returns the selection, or an invalid item
if there is no selection." Shouldn't this be enough to raise the
exception?
invalid item != exception
You can test it for validity though
selection = self.treectrl1.GetSelection()
if not selection:
raise SomeError
···
--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!