Displaying 20 results from an estimated 27 matches for "onok".
Did you mean:
ono
2010 Aug 03
1
adding FORTRAN code to a package
...s without 'PACKAGE' argument:
.Fortran("cov1", ...)
See the chapter 'System and foreign language interfaces' of the 'Writing R
Extensions' manual.
* checking R code for possible problems ... NOTE
acfMod: no visible binding for global variable 'top'
acfMod : onOK: no visible binding for global variable 'top'
acfMod: no visible binding for global variable 'buttonsFrame'
aggConv: no visible binding for global variable 'top'
aggConv : onOK: no visible binding for global variable 'newDataSet'
aggConv : onOK: no visible global fun...
2005 Jul 12
1
help: how to use tkevent.generate(...)
...to do some GUI programming, and want to find a
function which can do the operation "click a button", just like using
a mouse to click. If tkevent.generate can do that? I tried it as
below, but failed. Please give me a hint!
tt <- tktoplevel()
tkwm.title(tt,"Simple Dialog")
onOK <- function(){print("OK")}
onCancel <- function(){print("Cancel")}
OK.but <- tkbutton(tt, text=" OK ", command=onOK)
Cancel.but <- tkbutton(tt, text="Cancel",command=onCancel)
tkgrid(OK.but,Cancel.but)
tkevent.generate(tt, onOK)
Thank you,
Sh...
2013 Aug 03
1
tk + browser() can leave R unresponsive
...x for PR#15407 or not,
although without the fix there are more ways to trigger this.
I can reproduce with the following:
1. Open R in gnome-terminal or xterm
2. Run 'library(tcltk)'
3. Run 'trace(tk_select.list, edit = TRUE)'
and put "browser()" at the beginning of the onOK body (e.g. in Vim run
<<:g/onOK/put ='browser()'>>). That is, transform
onOK <- function() {
res <- 1L + as.integer(tkcurselection(box))
cat("res is: ", res)
ans.select_list <<- choices[res]
tkgrab.release(dlg)
t...
2008 Nov 23
1
tklistbox - R-Objekt
...ingle",background="white")
tkgrid(tklabel(tt,text="select method for LAI calculation"))
tkgrid(tl)
method<- c("method1","method2")
for (i in (1:2)){
tkinsert(tl,"end",method[i])
}
tkselection.set(tl,0)
OnOK <- function(){
choice<-method[as.numeric(tkcurselection(tl))+1]
tkdestroy(tt)
}
OK.but <-tkbutton(tt,text=" OK ",command=OnOK)
tkbind(tkgrid, "<Return>",OnOK)
tkgrid(OK.but)
The function works, but it does not create an...
2008 Jul 22
1
tklistbox and extracting selection to R
...tt<-tktoplevel()
tl<-tklistbox(tt,height=ntx,selectmode="single",background="white")
tkgrid(tklabel(tt,text="Select the legend of" ))
tkgrid(tl)
treatments<<-levels.tx
for(i in (1:ntx))
{
tkinsert(tl,"end",treatments[i])
}
OnOK<-function()
{
tx.choice1<<-treatments[as.integer(tkcurselection(tl))+1]
tkdestroy(tt)
}
OK.but<-tkbutton(tt,text=" OK ", command=OnOK)
tkgrid(OK.but)
tx.choice1
the console can't find tx.choice1, but if I type tx.choice1 directly...
2005 Aug 31
1
tcl/tk return problem
Hello,
I'm very new in working with tcl/tk in R and have a problem which will
probably
sound silly to most of you.
Here is the code I have problems with:
readcelfiles <- function()
{
require(tcltk)
tt <- tktoplevel()
tkgrid(tklabel(tt,text="Choose a directory!"))
OnOK <- function()
{
fileDir<-tclvalue(tkchooseDirectory())
data.raw <- ReadAffy(celfile.path=fileDir)
#return(data.raw)
}
OK.but <- tkbutton(tt,text="OK",command=OnOK)
tkgrid(OK.but)
tkfocus(tt)
}
So after clicking on my "OK" button, I choose my...
2004 Jun 09
1
Using macros
...tribute
mm <- match.call()
mm$expr <- NULL
mm[[1]] <- as.name("macro")
attr(ff, "source") <- c(deparse(mm), deparse(expr))
## return the macro
ff
}
OKCancelHelp <- defmacro(window=top, OKbutton=OKbutton, onOK=onOK,
cancelButton=cancelButton, onCancel=onCancel,
helpButton=helpButton, onHelp=onHelp, helpSubject,
expr={
OKbutton <- tkbutton(window, text="OK", fg="darkgreen",
width="12", command=onOK, default="active")...
2007 May 13
1
Dropdown boxes in tcltk and R
...re("BWidget")
tt <- tktoplevel()
tkgrid(tklabel(tt,text="What's your favorite fruit?"))
fruits <- c("Apple","Orange","Banana","Pear")
comboBox <- tkwidget(tt,"ComboBox",editable=FALSE,values=fruits)
tkgrid(comboBox)
OnOK <- 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)
t...
2009 Sep 28
2
re trieve user input from an tcl/tk interface
...aglog (
http://bioinf.wehi.edu.au/~wettenhall/RTclTkExamples/modalDialog.html like
this ) but I cannot figure out how to do this with multiple values to be
read.
I want to run a rather simple simulation and the user has to be able to set
multiple parameters (say, number of trials and stimuli). The onOK-function
should then "collect" these parameters and save them to variables (I guess).
Here is a snippet of my code. Could someone tell me what to do? Am I heading
in the right direction or is my approach hopeless? :p
-------------------------------------------------------------
OnOK =...
2003 Jun 06
4
stuck tcltk scrollbars under Windows XP
...n(...)
tkyview(xBox, ...))
xBox <- tklistbox(xFrame, height=4,
selectmode="single", background="white", exportselection="FALSE",
yscrollcommand=function(...) tkset(xScroll, ...))
for (x in letters) tkinsert(xBox, "end", x)
onOK <- function() {
tkgrab.release(window2)
tkfocus(window1)
tkdestroy(window2)
}
OKbutton <- tkbutton(window2, text="OK", width="12", command=onOK,
default="active")
tkgrid(xBox, xScroll, sticky="nw")
tkg...
2009 Oct 19
1
Problem with geometry manager in TclTK
...file.format1, variable=file.format, value="1")
tkconfigure(file.format2, variable=file.format, value="2")
tkgrid(tklabel(Choose.frame, text="Format 1 "),file.format1)
tkgrid(tklabel(Choose.frame, text="Format 2 "),file.format2)
tkgrid(Choose.frame)
onOK <- function() {
ReturnFormat <<- tclvalue(file.format)
tkgrab.release(ask.form)
tkdestroy(ask.form)
}
onCancel <- function() {
tkgrab.release(ask.form)
tkdestroy(ask.form)
}
Buttons.frame <- tkframe(ask.form, relief="groove")
OK.but <- tkbu...
2005 Apr 23
1
tclServiceMode: stop Tcl/Tk from updating
In Windows, Tcl/Tk programs running under the tcltk package can update
too frequently: for exmaple, we might go through a long sequence of
operations to construct a complex display, and in Windows each addition
will be shown separately.
To work around this, I've added a function "tclServiceMode" which serves
as an R interface to the "Tcl_SetServiceMode" function in the
2008 Jul 18
0
Retrieving data from a tcl /tk function
...idget <- tkentry(dlg, width = paste(entryWidth),
textvariable = textEntryVarTcl)
tkgrid(tklabel(dlg, text = " "))
tkgrid(tklabel(dlg, text = question), textEntryWidget)
tkgrid(tklabel(dlg, text = " "))
ReturnVal <- returnValOnCancel
onOK <- function() {
ReturnVal <<- tclvalue(textEntryVarTcl)
tkgrab.release(dlg)
tkdestroy(dlg)
tkfocus(ttMain)
}
onCancel <- function() {
ReturnVal <<- returnValOnCancel
tkgrab.release(dlg)
tkdestroy(dlg)
tkfocus(...
2009 Apr 14
0
disappearing dialog boxes when using tcltk
...lVar(paste(entryInit))
textEntryWidget <-
tkentry(dlg,width=paste(entryWidth),textvariable=textEntryVarTcl)
tkgrid(tklabel(dlg,text=" "))
tkgrid(tklabel(dlg,text=question),textEntryWidget)
tkgrid(tklabel(dlg,text=" "))
ReturnVal <- returnValOnCancel
onOK <- function()
{
ReturnVal <<- tclvalue(textEntryVarTcl)
tkgrab.release(dlg)
tkdestroy(dlg)
# tkfocus(dlg)
tkfocus(ttMain)
}
OK.but <-tkbutton(dlg,text=" OK
",command=onOK)
tkgrid(OK.but)
tkgrid(tklabel(dlg,text=" "))
tkfocu...
2009 Aug 12
0
tcltk in BATCH mode
...############ BEGIN R Scipt ############
require(tcltk)
tt <- tktoplevel()
tktitle(tt) <- "My Schedular"
Name <- tclVar("")
entry.Name <-tkentry(tt,width="18",textvariable=Name)
tkgrid(tklabel(tt,text="Please enter your name"))
tkgrid(entry.Name)
OnOK <- function() {
NameVal <- tclvalue(Name)
tkdestroy(tt)
msg <- paste("You have a nice name",NameVal)
tkmessageBox(title="Result",message=msg)
}
}
OK.but <-tkbutton(tt,text=" OK ",command = OnOK)
tkbind(entry.Name, "<Return>",...
2009 Jun 12
1
Masked user input
Hi -
I'm creating a package of database tools. A function in the package
requires the username and password as input to the function in order to
initially connect to the target database(s). Of course, this poses a
significant security issue given the possible retention of the function
statement in cleartext. I did not readily encounter a package meant to mask
input from the user nor do I
2009 Aug 10
1
building a package
...... OK
* checking for unstated dependencies in R code ... OK
* checking S3 generic/method consistency ... OK
* checking replacement functions ... OK
* checking foreign function calls ... OK
* checking R code for possible problems ... NOTE
xbara: no visible binding for global variable ?top?
xbara : onOK: no visible binding for global variable ?newDataSet?
xbara : onOK: no visible global function definition for ?newDataSet?
xbara: no visible binding for global variable ?buttonsFrame?
* checking Rd files ... OK
* checking Rd cross-references ... OK
* checking for missing documentation entries ... OK...
2004 Jun 19
4
FlexGridSizer question
...Test",
Wx::Point.new(10, 100),
Wx::Size.new(170,100))
frame.show(TRUE)
btn = Wx::Button.new(frame,:btn.id,"OK",
Wx::Point.new(10,10),Wx::DEFAULT_SIZE)
btn.evt_button(:btn.id){|event| onOK()}
end
def onOK()
begin
dialog = MyDialog.new(nil)
ret = dialog.show_modal()
rescue
Wx::message_box($!.to_s,"Error")
end
end
end
app = MyApp.new
app.main_loop()
__END__
-------------- next part --------------
An HTML attachment...
2006 Nov 04
1
tcltk difficulties
Friends:
I have a tcltk widget for inputting constants and other values that are
needed by subsequent R functions. My widget works well. I have an OnOK
function that does what I had hoped it would. Among other input items the
widget also uses 6 radio buttons to select one of 6 choices. It functions
as it should.
Here is the problem: I would like one of the buttons to be the default and
to be switched on when the widget is created so that the u...
2011 Oct 06
0
initial value in ComboBox tkwidget
...vel()
tkgrid(tklabel(tt,text="What's your favorite fruit?"))
fruits <- c("Apple","Orange","Banana","Pear")
comboBox <-
tkwidget(tt,"ComboBox",editable=TRUE,values=fruits,textvariable=tclVar("Banana"))
tkgrid(comboBox)
OnOK <- function()
{
fruitChoice <- fruits[as.numeric(tclvalue(tcl(comboBox,"getvalue")))]
tkdestroy(tt)
msg <- paste("Good choice! ",fruitChoice,"s are delicious!",sep="")
tkmessageBox(title="Fruit Choice",message=msg)
}
OK.but...