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

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

[Octave-bug-tracker] [bug #59620] Matlab script error in Octave


From: Pantxo Diribarne
Subject: [Octave-bug-tracker] [bug #59620] Matlab script error in Octave
Date: Thu, 10 Dec 2020 05:50:13 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:83.0) Gecko/20100101 Firefox/83.0

Follow-up Comment #6, bug #59620 (project octave):

@arve_v: You should separate the creation and property modification in your
script so that you can see which one is causing problems. Something like:


Values(1)   = uicontrol (Calculator, 'style', 'edit');

set (Values(1), 'units', 'characters','string', Js_def,...
     'position',[cavtextbox-4, Valuesboxht-4, editbox, editboxht], ...
     'backgroundcolor',[1 1 1], 'enable','off'); 


BTW, if you want to locate a function file, like run.m or uicontrol.m, just
type "which uicontrol" at the prompt. This won't help here since the error
happens in a buit-in compiled function, not in uicontrol.m.

@Markus: I'll push a change along those lines, to obtain a more informative
error message:


diff -r fbfa420380e3 libinterp/corefcn/graphics.cc
--- a/libinterp/corefcn/graphics.cc     Sun Dec 06 20:34:37 2020 +0100
+++ b/libinterp/corefcn/graphics.cc     Thu Dec 10 11:29:35 2020 +0100
@@ -13228,8 +13228,8 @@
     }
   catch (octave::execution_exception& e)
     {
-      error (e, "__go_%s__: unable to create graphics handle",
-             go_name.c_str ());
+      error (e, "__go_%s__: unable to create graphics handle, %s",
+             go_name.c_str (), e.message ().c_str ());
     }
 
   try
@@ -13239,8 +13239,8 @@
   catch (octave::execution_exception& e)
     {
       delete_graphics_object (h);
-      error (e, "__go_%s__: unable to create graphics handle",
-             go_name.c_str ());
+      error (e, "__go_%s__: unable to create graphics handle, %s",
+             go_name.c_str (), e.message ().c_str ());
     }
 
   adopt (parent, h);

 some property/value pairs in your script to wee which one is the offending
one

    _______________________________________________________

Reply to this item at:

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

_______________________________________________
  Message posté via Savannah
  https://savannah.gnu.org/




reply via email to

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