I everyone,

i have a little problem with tklistbox,the " " character and Rcmdr.

Please look at this code

require(tcltk)
tt<-tktoplevel()
levels.list2 <-tklistbox(tt,selectmode="multiple",exportselection="FALSE",
height=4, yscrollcommand=function(...)tkset(levels.list2.scroll,...))
levels.list2.scroll<-tkscrollbar(tt,repeatinterval=5,command=function(...)tkyview(levels.list2,...))

tkgrid(levels.list2,levels.list2.scroll)

vec<-c("a","b",""," ","   ")
tkdelete(levels.list2,"0","end")
for (var in vec) {tkinsert(levels.list2, "end", var)}



tclvalue(tkget(levels.list2,"0"))# a
tclvalue(tkget(levels.list2,"1"))# b
tclvalue(tkget(levels.list2,"2"))# ""
tclvalue(tkget(levels.list2,"3"))# " "   it's ok
tclvalue(tkget(levels.list2,"4"))# "  "  it's ok


library(Rcmdr)
#same command :
tclvalue(tkget(levels.list2,"0"))# a
tclvalue(tkget(levels.list2,"1"))# b
tclvalue(tkget(levels.list2,"2"))# ""
tclvalue(tkget(levels.list2,"3"))# ""   instead of " "
tclvalue(tkget(levels.list2,"4"))# ""  instead of "  "


it's crazy!?
any idea

Thank you

	[[alternative HTML version deleted]]

