I have tried to use amap but I was too difficult for me and I have tried the 
map:
  (def tree (com.vaadin.ui.Tree. "Planets"))
  (map #(.addItem tree (.toString (first %))) planets)

But I get an error: 
IllegalArgumentException Don't know how to create ISeq from: 
clojure.lang.PersistentStructMap$Def  clojure.lang.RT.seqFrom (RT.java:487)

I have a tree with 5 siblevels and I need something like this java code.
for (int i=0; i<planets.length; i++) {
  String planet = (String) (planets[i][0]);
  tree.addItem(planet);
  if (planets[i].length == 1) {
    tree.setChildrenAllowed(planet, false);
  } else {
    for (int j=1; j<planets[i].length; j++) {
      String moon = (String) planets[i][j];
      tree.addItem(6);
      tree.setParent(6 5);
      tree.setChildrenAllowed(6 false);
    }
    tree.expandItemsRecursively(planet);
  }
}

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to