Mercurial > hg > octave-nkf
diff scripts/ui/helpdlg.m @ 16508:f19e24c97b20
move common warndlg, errordlg, helpdlg, and msgbox code to private function
* message_dialog.m: New file.
* scripts/ui/module.mk: Include it in the list of functions.
* errordlg.m, helpdlg.m, warndlg.m, msgbox.m: Call message_dialog to
do most of the work.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Fri, 12 Apr 2013 18:17:26 -0400 |
parents | ff061068a66c |
children | 7f2395651a1c |
line wrap: on
line diff
--- a/scripts/ui/helpdlg.m +++ b/scripts/ui/helpdlg.m @@ -36,20 +36,7 @@ print_usage (); endif - if (! ischar (msg)) - if (iscell (msg)) - msg = sprintf ("%s\n", msg{:}); - msg(end) = ""; - else - error ("helpdlg: MSG must be a string or cellstr array"); - endif - endif - - if (! ischar (title)) - error ("helpdlg: TITLE must be a character string"); - endif - - h = javaMethod ("helpdlg", "org.octave.JDialogBox", msg, title); + retval = message_dialog ("helpdlg", msg, title); endfunction