[Rd] options( "menu" )
Prof Brian Ripley
ripley at stats.ox.ac.uk
Fri Aug 7 16:42:24 CEST 2009
There are plans for more wide-ranging GUI hooks, so please be patient.
(They are likely to make 2.10.0.)
On Fri, 7 Aug 2009, Romain Francois wrote:
> Hello,
>
> The current implementation of the menu function (in utils) makes it difficult
> for front-ends to hook in and propose an alternative display.
>
> Can there be something like options( "menu" ) to give control over it in case
> graphics = TRUE. The default could be then be factored out of the current
> menu :
>
> default.menu <- function( choices, multiple = FALSE, title ){
> if(.Platform$OS.type == "windows" || .Platform$GUI == "AQUA") {
> res <- select.list(choices = choices, multiple=multiple,
> title=title)
> return(match(res, choices, nomatch = 0L))
> } else if(.Platform$OS.type == "unix"
> && capabilities("tcltk") && capabilities("X11")
> && nzchar(Sys.getenv("DISPLAY"))) {
> res <- tcltk::tk_select.list(choices, multiple=multiple,
> title=title)
> return(match(res, choices, nomatch = 0L))
> }
> options( menu = default.menu )
>
> ... or maybe this should be done at the select.list level
>
> Romain
>
> --
> Romain Francois
> Professional R Enthusiast
> +33(0) 6 28 91 30 30
> http://romainfrancois.blog.free.fr
> |- http://tr.im/vzip : Code Snippet : List of CRAN packages
> |- http://tr.im/vsK1 : R parser package on CRAN
> `- http://tr.im/vshK : Transfer files through Rserve
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>
--
Brian D. Ripley, ripley at stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UK Fax: +44 1865 272595
More information about the R-devel
mailing list