graphicDeviceItem(value="", name, label=name, help="", tooltip="",
attr=list(size = c(480, 480)), model, editor, ...)
proto
object. Call obj$show_help()
to view its methods and properties.Item
graphIt <- function(n, ...) hist(rnorm(n))
dlg <- aDialog(items=list(n=integerItem(10), out=graphicDeviceItem()),
model_value_changed=function(.) do.call("graphIt", .$to_R()) ## ... allows out to pass in unnoticed
)
dlg$make_gui()
graphIt(dlg$get_n()) ## initial graphic
Run the code above in your browser using DataLab