I have the following code to select the input and output folders' directories.
require(gWidgets2RGtk2)
input=NULL
win = gwindow("Stage 1")
g = ggroup(horizontal=FALSE,cont=win)
g1=ggroup(cont=g)
svalue(input)<-gbutton("Input folder",cont=g1,expand=TRUE,handler=function(...) {
input=gfile(type="selectdir")
gmessage(paste0("Input directory set to ",input))
input
})
g2=ggroup(cont=g)
gbutton("Ouput folder",cont=g2,expand=TRUE,handler=function(...) {
output=gfile(type="selectdir")
gmessage(paste0("Output directory set to ",output))
})
However when run, the code does not return the input and output folder directories. Can anyone show me what I am doing wrong here?