octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #57211] __appdata__ property should be hidden


From: Rik
Subject: [Octave-bug-tracker] [bug #57211] __appdata__ property should be hidden
Date: Wed, 13 Nov 2019 11:47:18 -0500 (EST)
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko

Update of bug #57211 (project octave):

                  Status:          Patch Reviewed => Fixed                  
             Open/Closed:                    Open => Closed                 

    _______________________________________________________

Follow-up Comment #14:

I pushed cset version 2 here
(https://hg.savannah.gnu.org/hgweb/octave/rev/e18237114cf8).

I updated the commit message.  In particular, the default of the new
__appdata__ property is not an empty structure, but rather an empty matrix. 
This is in keeping with the rest of the graphics properties, and it probably
has performance benefits because an octave_map is a pretty heavyweight object.
 However, it did necessitate changing the code in getappdata.m so that it
returns an empty struct if the graphics object has no appdata applied.


--- a/scripts/gui/getappdata.m  Wed Nov 13 09:13:41 2019 -0500
+++ b/scripts/gui/getappdata.m  Wed Nov 13 08:24:12 2019 -0800
@@ -62,11 +62,11 @@ function value = getappdata (h, name)
     if (numel (h) != 1)
       error ("getappdata: Only one handle H may be used when fetching
appdata");
     endif
-    try
-      value = get (h, "__appdata__");
-    catch
+
+    value = get (h, "__appdata__");
+    if (isempty (value))
       value = struct ();
-    end_try_catch
+    endif
   endif


Marking as fixed and closing report.


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?57211>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]