On Thu, 31 Mar 2005, Martin Maechler wrote:

> >>>>> "BertG" == Berton Gunter <[EMAIL PROTECTED]>
> >>>>>     on Wed, 30 Mar 2005 10:09:38 -0800 writes:
>
>     BertG> If you are on Windows and want to go GUI, see
>     BertG> ?choose.files, ?winMenuAdd, ?winDialog, ?select.list
>
> with the big drawback that it will only work on Windows.

I don't think that a `big' drawback if you `want to go GUI', as GUI
conventions are so different between platforms (and tcltk being different
from the `native' one on each platform).  But we are beginning to attempt
to add platform-independent wrappers to GUI widgets.

> As Uwe says below, it depends on your context;
> for relative simple things, however please consider a portable
> solution, using
>                 menu(), readline(), ..
>
> BTW, menu() has been improved in R 2.1.0 (alpha --> please test!),
> and is now connected with select.list() which should work on all
> platforms (and uses tcltk on Linux when available).

To be a bit more specific,

menu() has a 'graphics' argument that uses a listbox on Windows, MacOS or
tcltk (where available).

select.list() works on all platforms, graphically as for
menu(graphics=TRUE), otherwise in text mode.

I intend to add a tcltk-based version of choose.files().  (One of the
problems with tcltk is that its widgets are OS-specific, and getting
select.list to choose a reasonable height tooks ages: there needs to a
fudge factor of 3 pixels/line on Unix and 1 pixel/line on Windows.)

-- 
Brian D. Ripley,                  [EMAIL PROTECTED]
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

______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to