[Rd] file.choose (PR#2465)

Duncan Murdoch dmurdoch@pair.com
Fri Jan 17 14:18:07 2003

On Thu, 16 Jan 2003 14:52:24 +0100 (MET), you wrote:

>R1.6.2 winnt.
>file.choose() gives an error if the dialog is cancelled without choosing a
>file. This can be easily dealt with via try(), but I would have thought that
>a NULL or NA return would be the expected behavior.

I'd be worried that a change like that would lead to bugs downstream.
Routines that make use of file.choose results would now have to check
for invalid input.

On the other hand, file.choose() could be more flexible.  For example,
the other day someone suggested to me that "install library from local
zip file" should be able to install multiple packages at once, and
that makes sense, but it requires multiple selections to be enabled in
the file selection menu.  There are a lot of other options to standard
Windows file dialogs, but I can't spot any that would really be
appropriate here.  Can anyone else?

Duncan Murdoch