octave-maintainers
[Top][All Lists]
Advanced

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

Re: Yet another GUI Builder for Octave


From: Mike Miller
Subject: Re: Yet another GUI Builder for Octave
Date: Thu, 14 Jul 2016 15:07:56 -0700
User-agent: Mutt/1.6.0 (2016-04-01)

On Thu, Jul 14, 2016 at 06:18:56 -0700, marcalexandre wrote:
> Hi Lachlan,
> First of all, thanks for your reply and your thoughts about my suggestion.
> 
> In fact, I know there is something called Octave-Gtk which also allow to
> make GUIs but it uses a complete different way and seems to be unmaintained
> right now.
> With Octave-Gtk the user has to code its GUI using all the Gtk stuffs, which
> can be quite complicated.
> The method I propose is, as you can see, very simple as the user just have
> to code its GUI with the Octave syntax.

Have you also looked at Qt's .ui file syntax? I wonder if something
similar could be done for GUIs made with Qt Creator (also an XML
format). I have used the pyuic tool before, for example, that parses .ui
files into Python (although directly using PyQt of course).

Not trying to put extra work on you, just another thought. Maybe a tool
could be written to import both .glade and .ui files and write .m files.

> I also don't understand your comment about the callbacks.
> I have successfully coded callbacks with my GUI Builder and it worked great.
> I don't understand the problem you explained about shared variables. For me
> there is no problem with it. Did you get a look at the attached files ? Am I
> missing something ?

Lachlan is talking about nested functions, which are different from
subfunctions. Your posted example uses subfunctions, or what Matlab
calls "local functions" (functions in the same .m file declared *after*
the endfunction). Handles to nested functions are currently not
implemented in Octave. So Lachlan's point is you would not currently be
able to do something like this

  function rungui ()
    x = 0;
    y = 0;

    gui_func (...)

    function callback1 ()
      x = x + 1;
    endfunction

    ...

  endfunction

Definitely an interesting start you have here. I think leveraging
existing GUI builders and mapping their outputs to Octave widget
functions is an excellent approach.

-- 
mike



reply via email to

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