[R-gui] [R GUI] validate for entries

James Wettenhall wettenhall at wehi.edu.au
Thu Apr 22 08:09:02 CEST 2004


Erin,


On Thu, 22 Apr 2004, Erin Hodgess wrote:
<SNIP>
> I'm stuck on the validate function.  I'm using Iwidgets of entryfield.
<SNIP>
> Trial <- tclVar(0)
> fs2 <- function() {
> 	NumTrial <- as.numeric(unlist(trial))
<SNIP>
> 	}
<SNIP>
> trial <- tkwidget(tt,"iwidgets::entryfield",labeltext="Number of Trials",
> 	labelpos="nw",command=fs1,validate=fs2)

It looks like you're trying to get the value from the entry box 
using unlist(trial) which doesn't seem right.

I think what you want to do is 
tkconfigure(trial,textvariable=Trial)

NumTrial <- as.numeric(tclvalue(Trial))

Hope this helps,
James



More information about the R-SIG-GUI mailing list