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

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


On Thu, 22 Apr 2004, Erin Hodgess wrote:
> I'm stuck on the validate function.  I'm using Iwidgets of entryfield.
> Trial <- tclVar(0)
> fs2 <- function() {
> 	NumTrial <- as.numeric(unlist(trial))
> 	}
> 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 

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

Hope this helps,

More information about the R-SIG-GUI mailing list