The R Project SVN R

Rev

Rev 25254 | Rev 56184 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 25254 Rev 27117
Line 216... Line 216...
216
tkpack(txt.w <- tktext(tt))
216
tkpack(txt.w <- tktext(tt))
217
tkinsert(txt.w, "0.0", "plot(1:10)")
217
tkinsert(txt.w, "0.0", "plot(1:10)")
218
 
218
 
219
# callback function 
219
# callback function 
220
eval.txt <- function()
220
eval.txt <- function()
221
   eval(parse(text=tkget(txt.w, "0.0", "end")))
221
   eval(parse(text=tclvalue(tkget(txt.w, "0.0", "end"))))
222
tkpack(but.w <- tkbutton(tt,text="Submit", command=eval.txt))
222
tkpack(but.w <- tkbutton(tt,text="Submit", command=eval.txt))
223
 
223
 
224
## Try pressing the button, edit the text and when finished:
224
## Try pressing the button, edit the text and when finished:
225
 
225
 
226
tkdestroy(tt)
226
tkdestroy(tt)