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

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

[Octave-bug-tracker] [bug #51161] Issues with GUI object callback functi


From: Pantxo Diribarne
Subject: [Octave-bug-tracker] [bug #51161] Issues with GUI object callback functions
Date: Sun, 4 Jun 2017 08:57:07 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:51.0) Gecko/20100101 Firefox/51.0

Update of bug #51161 (project octave):

                Category:                     GUI => Plotting               
                  Status:                    None => Need Info              

    _______________________________________________________

Follow-up Comment #1:

Hi,

Graphics callbacks support any kind of data, just don't forget that the two
first arguments to a callback are provided by the graphics system: arg 1 is
the handle to the object that triggered the callback execution, arg 2 contains
event data that depend on the situation (empty most of the time); see
https://www.gnu.org/software/octave/doc/interpreter/Callbacks.html#Callbacks
and the following example:


fcn = @(h, ev, arg1, arg2) printf ("\nhandle: %f\nevent data: %s\narg1:
%s\narg2: %s", h, disp (ev), disp (arg1), disp (arg2));
a = {"a", 2};
b = struct ("a", 1, "b", ones (1, 3));
figure ()
uimenu ("label", "foo", "callback", {fcn, a, b})


Your xv_roi_update misses the event argument.

Now about the crash you report when using a script as a callback function
(which is an error but should not crash Octave), can you give *simple* example
that triggers the crash for you.

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?51161>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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