## Not run: 
# ## make icons
# imagedir <- system.file("images",package="traitr")
# addStockIcons(gsub("\\\\.png","", list.files(path=imagedir)),
#               list.files(path=imagedir, full.names=TRUE))
# ## make item
# item <- itemList(items=list(),
#                  items_name="Personnel",
#                  item_factory = function(.) {
#                    a <- anItemGroup(items=list(
#                                       name=stringItem(""),
#                                       rank=choiceItem("Scout",
#                                            values=c("Scout","Captain","General")),
#                                       serial.number = stringItem("", label="Serial number")))
#                    a$post_process <- function(.) {
#                     .$icon <- tolower(.$get_rank())
#                     }
#                    a$to_string <- function(., drop=TRUE) .$to_R()$name
#                    return(a)
#                  },
#                  name="itemlist")
# 
# item$make_ui(container=gwindow("itemList test"))
# ## End(Not run)
Run the code above in your browser using DataLab