Mercurial > octave
diff scripts/gui/warndlg.m @ 20071:98d10871018a
Accept CREATEMODE argument for errordlg, warndlg, msgbox (bug #44775).
* errordlg.m: Update docstring. Use varargin to pass extra argument to msg_box.
* warndlg.m: Update docstring. Use varargin to pass extra argument to msg_box.
* msgbox.m: Update docstring.
* message_dialog.m: Issue warning if unimplemented CREATEMODE argument given.
Issue warning if icon type "custom" is used.
author | Rik <rik@octave.org> |
---|---|
date | Sat, 11 Apr 2015 08:18:42 -0700 |
parents | 0e1f5a750d00 |
children | 777f26aa8e3e |
line wrap: on
line diff
--- a/scripts/gui/warndlg.m Sat Apr 11 14:07:51 2015 +0900 +++ b/scripts/gui/warndlg.m Sat Apr 11 08:18:42 2015 -0700 @@ -19,6 +19,7 @@ ## -*- texinfo -*- ## @deftypefn {Function File} {@var{h} =} warndlg (@var{msg}) ## @deftypefnx {Function File} {@var{h} =} warndlg (@var{msg}, @var{title}) +## @deftypefnx {Function File} {@var{h} =} warndlg (@var{msg}, @var{title}, @var{createmode}) ## Display @var{msg} using a warning dialog box. ## ## The message may have multiple lines separated by newline characters @@ -26,16 +27,21 @@ ## line. The optional input @var{title} (character string) can be used to ## set the dialog caption. The default title is @qcode{"Warning Dialog"}. ## +## The return value is always 1. +## +## Compatibility Note: The optional argument @var{createmode} is accepted for +## @sc{matlab} compatibility, but is not implemented. +## ## @seealso{helpdlg, inputdlg, listdlg, questdlg} ## @end deftypefn -function retval = warndlg (msg, title = "Warning Dialog") +function retval = warndlg (msg, title = "Warning Dialog", varargin) - if (nargin < 1 || nargin > 2) + if (nargin < 1 || nargin > 3) print_usage (); endif - retval = message_dialog ("warndlg", msg, title, "warn"); + retval = message_dialog ("warndlg", msg, title, "warn", varargin{:}); endfunction