[Gambas-user] this piece of code crash gambas :)
Bodard Fabien
gambasfr at ...11...
Thu Jul 15 00:19:58 CEST 2004
Le mercredi 14 Juillet 2004 23:53, Laurent Carlier a écrit :
> gambas 0.92a
>
> This piece of code is a treeview with an item and is child.
>
> In the expand event, i try to delete the child item, causing segfault.
You do not try to delete the nodechild but the treeview itself !
the correction and more....
' Gambas class file
PUBLIC SUB _new()
treeview1.Add ("something","expand this")
treeview1.Add ("something expanded","something expanded",,"something")
END
PUBLIC SUB treeview1_Expand()
DIM i AS Integer
PRINT "expanded"
treeview1.Remove("something expanded")
PRINT "look as list !"
FOR i = 0 TO 10
treeview1.Add (Str(i), Str(i),,"something")
NEXT
END
Fabien Bodard
More information about the User
mailing list