help-octave
[Top][All Lists]
Advanced

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

Re: uicontrol fails to callback


From: Lachlan Andrew
Subject: Re: uicontrol fails to callback
Date: Wed, 23 Mar 2016 12:11:07 +1100

I wrote that patch, and am pretty sure it will NOT be in the next
release of Octave...

Handles to nested functions seem to work OK provided that they are
only used while those functions are "in scope".  The patch checks that
they handles aren't returned as function values or in global
variables.

My goal was also to allow a uicontrol, and it seems to work provided
that the GUI is closed "normally".  If an error occurs, or ^C is
pressed, then the GUI will remain but the calling function exits and
so the handles are out of scope.  This situations causes some rough
edges, and may be responsible for some segfaults that I was getting.

As such, the patch fills my current needs, but will need quite a bit
of work and lots of testing before being considered for a release.  If
you're willing to build from source, and will just be running your
script yourself rather than giving it to someone else to run, then it
may possibly also fill your needs...

Cheers,
Lachlan

On 23 March 2016 at 03:00, Nicholas Jankowski <address@hidden> wrote:
>
>
> On Tue, Mar 22, 2016 at 10:00 AM, Octave User <address@hidden> wrote:
>>
>>
>> Due to your remind, now I am going to study the real problem, the
>> unsupported nested function. Thank you very much. It would be appreciated
>> if
>> you can point out a direction on how to solve it.
>>
>
> you can find details of the complexities introduced by nested functions
> here:
> https://www.gnu.org/software/octave/doc/interpreter/Nested-Functions.html
>
> But that doesn't really do much to solving your problem, which is that while
> nested functions have been supported by recent versions of Octave, they
> still cannot support handles pointing to them  (the @function construct).
> There are some complexities of handling such things, and they are the topic
> of an open bug report in Octave:
> http://savannah.gnu.org/bugs/?39257
>
> There is a patch submitted to that bug, but I don't know enough to state
> whether it will be fixed in the next release of Octave.  In the meantime, it
> will likely require recoding the scripts in question to avoid the problem
> function calls.
>
> nickj



reply via email to

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