changeset 12593:47417d37c4db stable

Trivial merge of two stable heads
author Jordi Gutiérrez Hermoso <jordigh@gmail.com>
date Tue, 12 Apr 2011 01:28:31 -0500
parents 732a568bf694 (current diff) 4727fd4dd4bb (diff)
children 68eb9713b550
files
diffstat 3 files changed, 21 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/ChangeLog	Mon Apr 11 19:03:32 2011 -0700
+++ b/scripts/ChangeLog	Tue Apr 12 01:28:31 2011 -0500
@@ -1,3 +1,8 @@
+2011-04-11  Ben Abbott  <bpabbott@mac.com>
+
+	* miscellaneous/getappdata.m: If appdata propery does not exist, return
+	an empty matrix.
+
 2011-04-08  Rik  <octave@nomad.inbox5.com>
 
 	* linear-algebra/cond.m, linear-algebra/expm.m, linear-algebra/logm.m,
--- a/scripts/miscellaneous/getappdata.m	Mon Apr 11 19:03:32 2011 -0700
+++ b/scripts/miscellaneous/getappdata.m	Tue Apr 12 01:28:31 2011 -0500
@@ -29,14 +29,20 @@
     error ("getappdata: invalid input");
   endif
 
-  appdata(numel(h)) = struct();
+  ## FIXME - Is there a better way to handle non-existent appdata
+  ## and missing fields?
+  val = cell (numel (h), 1);
+  appdata = struct();
   for nh = 1:numel(h)
-    appdata(nh) = get (h(nh), "__appdata__");
+    try
+      appdata = get (h(nh), "__appdata__");
+    catch
+      appdata.(name) = [];
+    end_try_catch
+    val(nh) = {appdata.(name)};
   end
-  if (nh > 1)
-    val = {appdata.(name)};
-  else
-    val = appdata.(name);
+  if (nh == 1)
+    val = val{1};
   endif
 
 endfunction
--- a/src/ChangeLog	Mon Apr 11 19:03:32 2011 -0700
+++ b/src/ChangeLog	Tue Apr 12 01:28:31 2011 -0500
@@ -1,3 +1,7 @@
+2011-04-10  John Eaton  <jwe@octave.org>
+
+	* graphics.cc (Fishandle) Accept vector of handles (bug #33025).
+
 2011-04-08  Rik  <octave@nomad.inbox5.com>
 
 	* DLD-FUNCTIONS/balance.cc, DLD-FUNCTIONS/eig.cc,
@@ -5,10 +9,6 @@
 	DLD-FUNCTIONS/sqrtm.cc, DLD-FUNCTIONS/svd.cc, data.cc: Improve
 	docstrings.
 
-2011-04-10  John Eaton  <jwe@octave.org>
-
-	* graphics.cc: Allow ishandle() to accept vector of handles (bug 33025).
-
 2011-04-06  Rik  <octave@nomad.inbox5.com>
 
 	* DLD-FUNCTIONS/dmperm.cc, data.cc: Clean up operator and function