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@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

Reply via email to