changeset 28022:306df6825dd9

doc: Document return values for uigetdir/uigetfil when 'Cancel' button used (bug #57670). * uigetdir.m, uigetfile.m: Document return value of "double (0)" when 'Cancel' button used.
author Rik <rik@octave.org>
date Tue, 28 Jan 2020 07:59:52 -0800
parents 8933b2985dd5
children 915b3630eed0
files scripts/gui/uigetdir.m scripts/gui/uigetfile.m
diffstat 2 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/gui/uigetdir.m	Tue Jan 28 11:00:09 2020 +0900
+++ b/scripts/gui/uigetdir.m	Tue Jan 28 07:59:52 2020 -0800
@@ -32,6 +32,10 @@
 ## If @var{init_path} is not given the current working directory is used.
 ##
 ## @var{dialog_name} may be used to customize the dialog title.
+##
+## The output @var{dirname} is a character string with the name of the selected
+## directory.  However, if the @samp{Cancel} button is clicked the output is of
+## type double with the value @code{0}.
 ## @seealso{uigetfile, uiputfile}
 ## @end deftypefn
 
--- a/scripts/gui/uigetfile.m	Tue Jan 28 11:00:09 2020 +0900
+++ b/scripts/gui/uigetfile.m	Tue Jan 28 07:59:52 2020 -0800
@@ -80,7 +80,9 @@
 ## @qcode{"MultiSelect"} key to @qcode{"on"}.  In that case @var{fname} is a
 ## cell array containing the files.
 ##
-## @var{fname} and @var{fpath} return the chosen name and path, respectively.
+## The outputs @var{fname} and @var{fpath} are strings returning the chosen
+## name and path, respectively.  However, if the @samp{Cancel} button is
+## clicked the outputs are of type double with a value of @code{0}.
 ## @var{fltidx} is the index in the list of filter extensions @var{flt} that
 ## was selected.
 ##