changeset 29536:205033e01792

annotation.m: Fix callbacks called with too many inputs * annotation.m (textmenu, textboxmenu, addbasemenu): Discard the two required arguments in anonymous callbacks.
author Pantxo Diribarne <pantxo.diribarne@gmail.com>
date Thu, 15 Apr 2021 23:16:15 +0200
parents 0b429d1a4974
children 93a751f468d9
files scripts/plot/appearance/annotation.m
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/plot/appearance/annotation.m	Thu Apr 15 17:48:35 2021 +0200
+++ b/scripts/plot/appearance/annotation.m	Thu Apr 15 23:16:15 2021 +0200
@@ -675,7 +675,7 @@
 
   ## String;
   prop = "String";
-  fcn = @() stringdlg (hpar, prop);
+  fcn = @(~, ~) stringdlg (hpar, prop);
   uimenu (hm, "label", prop, "callback", fcn);
 
   ## Font properties
@@ -743,7 +743,7 @@
   hm1 = uimenu ("parent", hui, "label", "Text");
 
   prop = "String";
-  fcn = @() stringdlg (hpar, prop);
+  fcn = @(~, ~) stringdlg (hpar, prop);
   uimenu (hm1, "label", prop, "callback", fcn);
 
   prop = "Color";
@@ -853,7 +853,7 @@
       label = disp (val);
     endif
 
-    fcn = @() set (hpar, pname, val);
+    fcn = @(~, ~) set (hpar, pname, val);
     htmp(i) = uimenu (h, "label", label, "callback", fcn);
   endfor