diff scripts/gui/helpdlg.m @ 21637:59ebef9680ef

More cleanup associated with removing Java dialog boxes (cset b5d9b95d1e1a). * NEWS: List errordlg only once in list of Java functions removed. * errordlg.m: Use a single sentence description of function for first documentation paragraph. Correct misspelling of "occurred". Match variable names in code to those in docstring. * helpdlg.m, warndlg.m: Use a single sentence description of function for first documentation paragraph. Match variable names in code to those in docstring. * inputdlg.m: Match variable names in code to those in docstring. Use function name as prefix to all error messages. Use spaces and line wrapping to make %!demos more readable. * listdlg.m: Re-order and rephrase some of docstring. Add more input validation. Add new BIST tests for input validation. * questdlg.m: Re-order some of docstring. Use function name as prefix to all error messages. Eliminate unreachable otherwise statement in switch block. Add new BIST tests for input validation.
author Rik <rik@octave.org>
date Wed, 20 Apr 2016 15:54:37 -0700
parents b5d9b95d1e1a
children bac0d6f07a3e
line wrap: on
line diff
--- a/scripts/gui/helpdlg.m	Wed Apr 20 15:29:35 2016 -0700
+++ b/scripts/gui/helpdlg.m	Wed Apr 20 15:54:37 2016 -0700
@@ -20,10 +20,11 @@
 ## @deftypefn  {} {@var{h} =} helpdlg ()
 ## @deftypefnx {} {@var{h} =} helpdlg (@var{msg})
 ## @deftypefnx {} {@var{h} =} helpdlg (@var{msg}, @var{title})
-## Display help message @var{msg} using a help dialog box with caption
-## @var{title} (character string).  The default help message is
-## @qcode{"This is the default help string."} and the default caption is
-## @qcode{"Help Dialog"}.
+## Display a help dialog box with help message @var{msg} and caption
+## @var{title}.
+##
+## The default help message is @qcode{"This is the default help string."} and
+## the default caption is @qcode{"Help Dialog"}.
 ##
 ## The help message may have multiple lines separated by newline characters
 ## ("\n"), or it may be a cellstr array with one element for each line.
@@ -48,20 +49,22 @@
 
   narginchk (0, 2);
 
-  box_msg = "This is the default help string.";
-  box_title = "Help Dialog";
+  msg = "This is the default help string.";
+  title = "Help Dialog";
 
   if (nargin > 0)
-    box_msg = varargin{1};
+    msg = varargin{1};
   endif
   if (nargin > 1)
-    box_title = varargin{2};
+    title = varargin{2};
   endif
 
-  retval = msgbox (box_msg, box_title, "help");
+  retval = msgbox (msg, title, "help");
 
 endfunction
 
-%!error<narginchk> helpdlg (1, 2, 3)
-%!error<MSG must be a character string> helpdlg (1)
-%!error<TITLE must be a character string> helpdlg ("msg", 1)
+
+%!error helpdlg (1, 2, 3)
+%!error <MSG must be a character string> helpdlg (1)
+%!error <TITLE must be a character string> helpdlg ("msg", 1)
+