[wxPython] wxTreeCtrl SetPyData

Hello Robin,

I had some bad experience with wxTreeCtrl.SetPyData(). When i use it
several times to same tree item i got:
"Fatal Python error: PyThreadState_Get: no current thread"
It shows at third to fifth call.

      data = self.tree.GetItemData( ni )
      data.SetData( s )

Gives me same error. Solution was to use:
      self.tree.SetItemData( ni, wxTreeItemData( s ) )

I looked at sources but saw nothing suspicious.

NT4, Python 1.5.2, wxPython 2.2.0 and 2.2.1

···

--
Best regards,
Niki

_______________________________________________
wxPython-users mailing list
wxPython-users@lists.sourceforge.net
http://lists.sourceforge.net/mailman/listinfo/wxpython-users

I had some bad experience with wxTreeCtrl.SetPyData(). When i use it
several times to same tree item i got:
"Fatal Python error: PyThreadState_Get: no current thread"
It shows at third to fifth call.

      data = self.tree.GetItemData( ni )
      data.SetData( s )

Gives me same error. Solution was to use:
      self.tree.SetItemData( ni, wxTreeItemData( s ) )

I looked at sources but saw nothing suspicious.

I did. I think I've fixed it.

Thanks!

···

--
Robin Dunn
Software Craftsman
robin@AllDunn.com
http://wxPython.org Java give you jitters?
http://wxPROs.com Relax with wxPython!

_______________________________________________
wxPython-users mailing list
wxPython-users@lists.sourceforge.net
http://lists.sourceforge.net/mailman/listinfo/wxpython-users