[R] Using text put into a dialog box
RagingJim
nowa0021 at flinders.edu.au
Mon Feb 15 05:34:39 CET 2010
I have written in R this:
require(tcltk)
tt<-tktoplevel()
Name <- tclVar("")
entry.Name <-tkentry(tt,width="20",textvariable=Name)
tkgrid(tklabel(tt,text="Please enter site number."))
tkgrid(entry.Name)
OnOK <- function()
{
NameVal <- tclvalue(Name)
use.this=NameVal
tkdestroy(tt)
}
OK.but <-tkbutton(tt,text=" OK ",command=OnOK)
tkbind(entry.Name, "<Return>",OnOK)
tkgrid(OK.but)
tkfocus(tt)
Fairly simple, yet I am trying to figure out how to save the text that the
user writes into the text box. This data will then be used for a query into
a SQL database. How do I go about using what is written?
Cheers
--
View this message in context: http://n4.nabble.com/Using-text-put-into-a-dialog-box-tp1555761p1555761.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list