[wxPython] treeitem compare

in W98,2.1.15 such a compare crashes (in 2.1.14 not):

self.root = self.tree.AddRoot( 'txt' )
x[0]= self.root
if x[0] != None:
  print 'nnnn'

regards, Udo

in W98,2.1.15 such a compare crashes (in 2.1.14 not):

self.root = self.tree.AddRoot( 'txt' )
x[0]= self.root
if x[0] != None:
  print 'nnnn'

What do you get if you "print self.root" ?

···

--
Robin Dunn
Software Craftsman
robin@AllDunn.com
http://AllDunn.com/robin/
http://AllDunn.com/wxPython/ Check it out!

this is original part:

      self.root = self.tree.AddRoot(
self.menue_txt.get("txt_Einstellsatz", self.sprache) )

      to_select= [None, None, None]
      kategor= self.para_obj.get_kategor_kurzbez()
      for k in kategor:
        txt= self.para_obj.get_kategor_anzeige(k, self.sprache)
        ti_k= self.tree.AppendItem(self.root, txt,
data=wxTreeItemData(k))

        gruppen= self.para_obj.get_gruppen_kurzbez(k)
        for g in gruppen:
          txt= self.para_obj.get_gruppe_anzeige(k, g, self.sprache)
          x= self.tree.AppendItem(ti_k, txt, data=wxTreeItemData(g))
#-> here is the compare, (selection of the first branch)
          if to_select[0] == None:
            to_select[0]= x
            self.tree.SelectItem(x) #select first item default
            to_select[1]= k; to_select[2]= g
        self.tree.Expand(ti_k)

      self.tree.Expand(self.root)

Robin Dunn schrieb:

···

> in W98,2.1.15 such a compare crashes (in 2.1.14 not):
>
> self.root = self.tree.AddRoot( 'txt' )
> x[0]= self.root
> if x[0] != None:
> print 'nnnn'
>

What do you get if you "print self.root" ?

--
Robin Dunn
Software Craftsman
robin@AllDunn.com
http://AllDunn.com/robin/
http://AllDunn.com/wxPython/ Check it out!

_______________________________________________
wxPython-users mailing list wxPython-users@wxwindows.org
http://wxwindows.org/mailman/listinfo/wxpython-users