Problem during exploration of tree sub-items [message #464411] |
Wed, 23 November 2005 10:03 |
Eclipse User |
|
|
|
Originally posted by: maxime.cailloux.cea.fr
Hi,
I've a problem when I want to explore sub-items of a tree. Indeed, during
the exploration of the items (index 1), there is never probem but when I
want visit items of an item previously visited(index 2), sometimes the
node is visited and sometimes it's not and this randomly.
Here's my code:
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++++++++++++
TreeItem[] selection_domain=domain_composite.getSelection();
int index=0;
while (index<selection_domain.length){
System.out.println(selection_domain[index].getClass().getNam e());
//NO PROBLEM: correctly printed
TreeItem[] child_selection=selection_domain[index].getItems();
int index2=0;
while (index2<child_selection.length)
{
System.out.println(child_selection[index2].getClass().getNam e());
index2++; // PROBLEM : sometimes
//(child_selection[index2].getClass().getName())==null), sometimes
//(child_selection[index2].getClass().getName()) correctly printed!)
}
index++;
}
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++++++++++++
N.B. My code is simplified for a better comprehension...
Could you help me?
Thanks by advance!
Maxime
|
|
|
Powered by
FUDForum. Page generated in 0.02985 seconds