Alberto Monteiro
2007-Jul-05 20:08 UTC
[R] Me again, about the horrible documentation of tcltk
How on Earth can I know what are the arguments of any of the functions of the tcl/tk package? I tried hard to find, using all search engines available, looking deep into keywords of R, python's tkinter and tcl/tk, but nowhere I found anything remotely similar to a help. For example, what are the possible arguments to tkgetOpenFile? I know that this works: library(tcltk) filename <- tclvalue(tkgetOpenFile( filetypes="{{Porn Files} {.jpg}} {{All files} {*}}")) if (filename != "") cat("Selected file:", filename, "\n") but, besides filetypes, what are the other arguments to tkgetOpenFile? I would like to force the files to be sorted by time, with most recent files coming first (and no, the purpose is not to use for porn files). Alberto Monteiro
Peter Dalgaard
2007-Jul-05 20:38 UTC
[R] Me again, about the horrible documentation of tcltk
Alberto Monteiro wrote:> How on Earth can I know what are the arguments of any of the functions of > the tcl/tk package? I tried hard to find, using all search engines > available, looking deep into keywords of R, python's tkinter and tcl/tk, but > nowhere I found anything remotely similar to a help. > > For example, what are the possible arguments to tkgetOpenFile? > > I know that this works: > > library(tcltk) > filename <- tclvalue(tkgetOpenFile( > filetypes="{{Porn Files} {.jpg}} {{All files} {*}}")) > if (filename != "") cat("Selected file:", filename, "\n") > > but, besides filetypes, what are the other arguments to > tkgetOpenFile? I would like to force the files to be sorted by > time, with most recent files coming first (and no, the purpose is > not to use for porn files). > >man n tk_getOpenFile or if you are not on Unix/Linux, find it online with Google> Alberto Monteiro > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >
"Alberto Monteiro" <albmont at centroin.com.br> wrote:> How on Earth can I know what are the arguments of any of the functions of > the tcl/tk package? [...]My impression is that you as supposed to look in tck/tk manuals. For example, Googling on tk tck getopenfile pointed to this Web page: http://www.tcl.tk/man/tcl8.5/TkCmd/getOpenFile.htm Hope that helps. -- Mike Prager, NOAA, Beaufort, NC * Opinions expressed are personal and not represented otherwise. * Any use of tradenames does not constitute a NOAA endorsement.
James MacDonald
2007-Jul-05 20:45 UTC
[R] Me again, about the horrible documentation of tcltk
Hi Alberto, It took me approximately 20 seconds to find all the arguments for this function. Here were the steps I took. 1.) Look at R help page ?tkgetOpenFile 2.) Hmmm. Lots of functions, but little info. But wait, what's this? Details: [snip] There are far too many of these commands to describe them and their arguments in full. Please refer to the Tcl/Tk documentation for details. With a few exceptions, the pattern is that Tk subcommands like 'pack configure' are converted to function names like 'tkpack.configure', and Tcl subcommands are like 'tclfile.dir'. 3.) Type tkgetOpenFile at R prompt.> tkgetOpenFilefunction (...) tcl("tk_getOpenFile", ...) <environment: namespace:tcltk> 4.) Google tk_getOpenFile. 5.) http://www.tcl.tk/man/tcl8.5/TkCmd/getOpenFile.htm Best, Jim -- James W. MacDonald, M.S. Biostatistician Affymetrix and cDNA Microarray Core University of Michigan Cancer Center 1500 E. Medical Center Drive 7410 CCGC Ann Arbor MI 48109 734-647-5623>>> "Alberto Monteiro" <albmont at centroin.com.br> wrote: > How on Earth can I know what are the arguments of any of the functions of > the tcl/tk package? I tried hard to find, using all search engines > available, looking deep into keywords of R, python's tkinter and tcl/tk, but > > nowhere I found anything remotely similar to a help. > > For example, what are the possible arguments to tkgetOpenFile? > > I know that this works: > > library(tcltk) > filename <- tclvalue(tkgetOpenFile( > filetypes="{{Porn Files} {.jpg}} {{All files} {*}}")) > if (filename != "") cat("Selected file:", filename, "\n") > > but, besides filetypes, what are the other arguments to > tkgetOpenFile? I would like to force the files to be sorted by > time, with most recent files coming first (and no, the purpose is > not to use for porn files). > > Alberto Monteiro > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code.********************************************************** Electronic Mail is not secure, may not be read every day, and should not be used for urgent or sensitive issues.
Mike Meredith
2007-Jul-06 07:51 UTC
[R] Me again, about the horrible documentation of tcltk
I think it would help if the tcl/tk manuals were added to the RGui Help menu. Why google when they are on your hard drive already? Cheers, Mike Mike Prager wrote:> > "Alberto Monteiro" <albmont at centroin.com.br> wrote: > >> How on Earth can I know what are the arguments of any of the functions of >> the tcl/tk package? [...] > > My impression is that you as supposed to look in tck/tk manuals. > For example, Googling on > > tk tck getopenfile > > pointed to this Web page: > > http://www.tcl.tk/man/tcl8.5/TkCmd/getOpenFile.htm > > Hope that helps. > > -- > Mike Prager, NOAA, Beaufort, NC > * Opinions expressed are personal and not represented otherwise. > * Any use of tradenames does not constitute a NOAA endorsement. > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > >-- View this message in context: http://www.nabble.com/Me-again%2C-about-the-horrible-documentation-of-tcltk-tf4032019.html#a11460111 Sent from the R help mailing list archive at Nabble.com.