search for: tkwait

Displaying 20 results from an estimated 35 matches for "tkwait".

Did you mean: _wait
2008 Aug 11
3
tkentry that exits after RETURN?
...<- tklabel(tt, text="Enter Password") password.widget <- tkentry(tt,show="*",textvariable=pass) ok <- tkbutton(tt,text="OK",default="active", command=function()tkdestroy(tt)) tkpack(label.widget, password.widget,ok) tkwait.window(tt) return(tclvalue(pass)) } thanks Ben Bolker -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 252 bytes Desc: OpenPGP digital signature URL: <https://stat.ethz.ch/pipermail/r-help/atta...
2009 Oct 19
1
Problem with geometry manager in TclTK
...0) tkgrid(Buttons.frame) print(as.integer(tclvalue(tkwinfo("height", ask.form)))) tkbind(ask.form, "<Destroy>", function() onCancel) tkbind(ask.form, "<KeyPress-Return>", onOK) tkbind(ask.form, "<KeyPress-Escape>", onCancel) tkwait.window(ask.form) return(ReturnFormat) } inputDialog <- function() { input <- tktoplevel(background="white") tkgrab.set(input) tkfocus(input) tkwm.title(input, "Data Input") tkwm.resizable(input, 0, 0) OpenVal <- c(0,0) getfile <- function() { ##...
2000 Sep 29
1
Two tcltk questions and Re: tcltk package functionality
...functions, but I > cannot seem to implement that functionality in R.....what am I doing wrong? > I enclose below the sample function...Any help will be greatly > appreciated.... > To stop the evaluation of a function until a specific tcltk action is done you have to use the tk-function tkwait.variable(). The following function -- a simple modification of Prasad's tcltktst function -- shows an example: tcltk.test <- function(x1=1:10, x2=10:1) { library("tcltk") # define first toplevel-widget tt <- tktoplevel() tktitle(tt) <- "Diagnostics"...
2000 Sep 28
0
No subject
...="left") + tkpack(but.wid) + + dxcbutt <- "OK" + while(dxcbutt == "OK") { + if(dxcbutt=="Cancel") break + } + + plot(xd$AVGT, xd$PPT) + + } To stop the evaluation of a function until a specific tcltk action is done you have to use the tk-function tkwait.variable(). The following function -- a simple modification of Prasad's tcltktst function -- shows an example: tcltk.test <- function(x1=1:10, x2=10:1) { library("tcltk") # define first toplevel-widget tt <- tktoplevel() tktitle(tt) <- "Diagnostics"...
2002 Feb 22
2
Tcl/Tk window lingering too long
...ependent thing? Any hints would be welcomed. Thanks, David test<-function(){ require(tcltk) base<-tktoplevel() done<-tclVar(0) ok.but<-tkbutton(base,text="OK", command=function(){ tclvalue(done)<-3 }) tkpack(ok.but) tkwait.variable(as.character(done)) tkdestroy(base) x<-rnorm(400000) print("finished")} > version _ platform powerpc-apple-darwin5.3 arch powerpc os darwin5.3 system powerpc, darwin5.3 status major 1 minor 4.1 year 2002 month 01 day 30...
2009 Apr 28
1
[macosx] improving quartz & Aqua Tk behaviour outside of RGui
Hello, On Mac OS X, certain Aqua/Quartz UI functionality requires an application to be launched from within an app bundle, or (alternatively) requires a Carbon application with a resource fork. Playing with the wxWidgets distribution, I discovered that it is quite easy and transparent to make such a Carbon app from (I guess) any command line application. When applied to the R executable called
2009 Apr 28
1
[macosx] improving quartz & Aqua Tk behaviour outside of RGui
Hello, On Mac OS X, certain Aqua/Quartz UI functionality requires an application to be launched from within an app bundle, or (alternatively) requires a Carbon application with a resource fork. Playing with the wxWidgets distribution, I discovered that it is quite easy and transparent to make such a Carbon app from (I guess) any command line application. When applied to the R executable called
2007 May 13
1
Dropdown boxes in tcltk and R
...K <- function() { tkdestroy(tt) msg <- paste("Good choice! ",fruitChoice,"s are delicious!",sep="") tkmessageBox(title="Fruit Choice",message=msg) } OK.but <-tkbutton(tt,text=" OK ",command=OnOK) tkgrid(OK.but) tkfocus(tt) tkwait.window(tt) fruitChoice <- fruits[as.numeric(tclvalue(tcl(comboBox,"getvalue")))+1] fruitChoice Which gives me: Error in structure(.External("dotTclObjv", objv, PACKAGE = "tcltk"), class = "tclObj") : [tcl] invalid command name ".14.2&quot...
2002 Feb 11
0
read.table in TCL/TK interface
...Run",command=run) tkgrid(tklabel(tt,text="Recursive Partioning"),columnspan=1) tkgrid(tklabel(tt,text="y variable"), y.entry) tkgrid(submit.but) ## capture destroy (e.g. from window controls ## otherwise the tkwait hangs with nowhere to go tkbind(tt, "<Destroy>", function()tclvalue(done)<-2) tkwait.variable(done) if(tclvalue(done)=="2") stop("aborted") tkdestroy(tt) cmd <- build() cat("### Command executed via Tk...
2006 Jul 08
1
another tcl/tk query
Greetings: I wish to use a tcl/tk widget to ask for user-selected parameter values. My widget works ? it asks for and returns to my workspace the stuff I need. Here is a snippet of my code: ############################### OnOK <- function() { LOG.X <<- as.logical(as.character(tclvalue(log.X.buttonValue))) LOG.Y <<- as.logical(as.character(tclvalue(log.Y.buttonValue)))
2000 Sep 29
0
Is it R or I?
...tclvar$done2<-"T" tkdestroy(tt2a) }) tkpack(but.lab2, but.wid22, but.wid23) # wait until DONE is pressed tclvar$done2 <- "F" tkwait.variable("done2") } residplot <- function() { plot(tmpzx$fit, tmpzx$residuals) abline(h=0) opfr <- opf2b idf.x <- tmpzx$fit idf.y <- tmpzx$residuals flag <- 2 assign("flag", flag, env=.GlobalEnv) assign(&quo...
2008 Mar 19
1
Radio Buttons or similars
Hello companions!!! I have a function that creates a Radio Buttons, and I need that this function return the selected value in the Radio Buttons. I would like that, if somebody know as I could return the value, you say me as do it. Next, I show the function function1<-function(){ require(tcltk) tt <- tktoplevel() rb1 <- tkradiobutton(tt) rb2 <- tkradiobutton(tt) rbValue <-
2002 Jan 28
2
R/Tk from batch file
Dear R-help, Reccently I've been working on sample size estimates for our forensic scientists and have to make the work accessible to them, preferably in some Windows based graphical form. The obvious choise was Tk via R, so I now have a couple of very nice, user friendly front ends for calculating betas and beta-binomials which run equally well under Windows and other systems (same code -
2005 Sep 05
1
tcltk, X11 protocol error: Bug?
...arlst <- tclArray() for(i in 1:n.col){ item<-tkcreate(canvas.r,"rect",xl,0,xl+inc,50, fill=rmpcol[i],outline=rmpcol[i]) ##tkaddtag(canvas.r, "point", "withtag", item) barlst[[i]]<-item xl <- xl+inc } tkgrab.set(tt) tkwait.window(tt) ##tkdestroy(tt) invisible(cr) }
2012 Nov 19
6
tcltk freezing using MS Windows for R-2.14+
...lt;- tktoplevel(MainWindow) tkwm.deiconify(GNMethod) tkgrab.set(GNMethod) tkfocus(GNMethod) tkwm.title(GNMethod,"Get Method") tkbind(GNMethod,"<Destroy>",function() {ReturnVal <- "";tkgrab.release(GNMethod);tkfocus(MainWindow);}) tkwait.window(GNMethod) return (ReturnVal) }#end of GetNMethod <- function() and then run the function testGUI() A Main Window pops up with "Main Window" in the Menu bar. Click on "Main Window" and the first (and only) item on the menu drops down and it is called "Nor...
2003 Jun 06
4
stuck tcltk scrollbars under Windows XP
Dear R-devel list members, I've encountered a problem with my Rcmdr package under Windows XP and could use some advice: The Rcmdr package uses the tcltk package to create menus and dialog boxes. My standard procedure when a dialog is created is to grab the focus -- e.g., by tkfocus(top) tkgrab(top) (Here, top is a top-level window -- say, containing one or more scrollbars.)
2002 Jun 06
0
tcltk and locator interaction
...where "tq" <- function(){ base <- tktoplevel() done <- tclVar(0) q.but <- tkbutton(base,text="Quit", command=function()tclvalue(done) <- 1) tkpack(q.but) tkbind(base, "<Destroy>", function()tclvalue(done) <- 2) tkwait.variable(done) if(tclvalue(done)=="2") stop("aborted") tkdestroy(base) } I am working on Solaris using R 1.5.0. Robert Denham ************************************************************************ The information in this e-mail together with any attachments is intend...
2006 Mar 02
0
tcltk error when calling a dialog
...ot;/)/ onNO <- function/()/ { tkgrab./release(/mddlg2/)/ /tkdestroy(/mddlg2/)/ /tkfocus(/dlg/)/ } // NO.but <- /tkbutton(/mddlg2,text=" Cancel ",command=onNO/)/ /tkgrid(/NO.but,pady=2/)/ /tkfocus(/mddlg2/)/ tkwait./window(/mddlg2/)/ } Please for those who are used to utilize the tcltk library: ¿Can you see a clear error in this? I'm new to this library and tcltk and I'm unable to find out the error. Thanks and best regards, Javier ------------ [[alternative HTML version deleted]]
2008 Jul 18
0
Retrieving data from a tcl /tk function
...ot; Cancel ", command = onCancel) tkgrid(OK.but, Cancel.but) tkgrid(tklabel(dlg, text = " ")) tkfocus(dlg) tkbind(dlg, "<Destroy>", function() {tkgrab.release(dlg); tkfocus(ttMain)}) tkbind(textEntryWidget, "<Return>", onOK) tkwait.window(dlg) return(ReturnVal) } # Create a "main" window with a button which activates our dialog require(tcltk) ttMain <- tktoplevel() tktitle(ttMain) <- "ttMain" launchDialog <- function() { ReturnVal <- modalDialog("First Name Entry", "Ent...
2009 Feb 23
1
Listbox in R
I am trying to display a set of listboxes in a systematic manner. For instance, I display Listbox 1, let the user pick the parameters of interest then destroy it. Now I display Listbox 2.... and so on. So in essence I would like to create listboxes in a "for -loop". When I try to loop - all the listboxes are displayed simultaneously and nothing works properly - any comment on how to