Mercurial > hg > octave-lojdl
changeset 8188:946035db5605
delete.m: Permit a vector of handles to be deleted.
author | Ben Abbott <bpabbott@mac.com> |
---|---|
date | Mon, 06 Oct 2008 20:36:31 -0400 |
parents | b04109600a82 |
children | 8e8afefe9466 |
files | scripts/ChangeLog scripts/miscellaneous/delete.m |
diffstat | 2 files changed, 9 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,3 +1,7 @@ +2008-10-06 Ben Abbott <bpabbott@mac.com> + + * miscellaneous/delete.m: Permit a vector of handles to be deleted. + 2008-10-02 John W. Eaton <jwe@octave.org> * pkg/pkg.m (configure_make): Handle filenames with spaces.
--- a/scripts/miscellaneous/delete.m +++ b/scripts/miscellaneous/delete.m @@ -19,7 +19,7 @@ ## -*- texinfo -*- ## @deftypefn {Function File} {} delete (@var{file}) ## @deftypefnx {Function File} {} delete (@var{h}) -## Delete the named file or figure handle. +## Delete the named file or graphics handle. ## @end deftypefn ## PKG_ADD: mark_as_command delete @@ -31,9 +31,11 @@ if (nargin == 1) if (ischar (arg)) unlink (arg); - elseif (ishandle (arg)) + elseif (all (ishandle (arg))) ## Delete a graphics object. - __go_delete__ (arg); + for n = 1:numel(arg) + __go_delete__ (arg(n)); + endfor else error ("delete: expecting argument to be a filename or graphics handle"); endif