[R] tk_choose.files without multiple selection?

Prof Brian Ripley ripley at stats.ox.ac.uk
Tue Oct 27 22:42:23 CET 2009


This depends on the version of Tk you have installed.  The Tk 8.5.7
ChangeLog has

2008-08-25  Todd M. Helfter <tmh at users.sourceforge.net>

         The patch is associated with the bug tracker id: 1936220
         library/tkfbox.tcl : fix the multiple selection error for
         tk_getOpenFile -multiple 1 which fails on all unix platforms since
         the adoption of ttk widgets.

for just after 8.5.4.

So I suggest you update your OS's Tcl/Tk if it is older than that 
(and that fix is 14 months old, so one would hope that your OS has 
updates available).

R for Windows ships with 8.5.6, R for Mac OS X with 8.5.5.

On Tue, 27 Oct 2009, Eger, Marcus wrote:

> Dear all,
>
> I compared tk_choose.files on linux with choose.files or
> tk_choose.files on windows and found that tk_choose.files does not 
> allow multiple selection on linux - independent on keyword setting 
> "multi".

>> tk_choose.files(default=paste(path.original,"",sep=""),caption="Select file(s)")
>
> On linux I get the error message:
>    File <list of selected filenames> does not exist.
> I have to click "cancel" to get out of the dialog.
> Any ideas?
>
> Regards
> 	Marcus
>
> Windows XP:
> -----------
> platform       i386-pc-mingw32
> arch           i386
> os             mingw32
> system         i386, mingw32
> status
> major          2
> minor          9.2
> year           2009
> month          08
> day            24
> svn rev        49384
> language       R
> version.string R version 2.9.2 (2009-08-24)
>
>
> Linux Ubuntu 8.04.3:
> --------------------
> platform       i486-pc-linux-gnu
> arch           i486
> os             linux-gnu
> system         i486, linux-gnu
> status
> major          2
> minor          9.2
> year           2009
> month          08
> day            24
> svn rev        49384
> language       R
> version.string R version 2.9.2 (2009-08-24)

-- 
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-help mailing list