From dmurdoch@pair.com  Fri Jan 17 14:18:07 2003
From: dmurdoch@pair.com (Duncan Murdoch)
Date: Fri Jan 17 14:18:07 2003
Subject: [Rd] file.choose (PR#2465)
In-Reply-To: <200301161352.OAA11813@pubhealth.ku.dk>
References: <200301161352.OAA11813@pubhealth.ku.dk>
Message-ID: <atuf2vsdaitpo7an37dd2tug7b90a05n6m@4ax.com>

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



[Rd] file.choose (PR#2465)
Duncan Murdoch