lua-users home
lua-l archive

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

I must agree with Miles, lua-gtk is a marvelous project, and Wolfgang
is very helpful. Building it is a bit of a mission but I got it going
eventually!  He has released binaries for both Linux and Windows

It's totally possible to put a higher-level interface on top. Here's an example:

require 'gtkx'

function test_dialog()
    res = gtkx.data_dialog {
        title = "Test Data Dialog",
        {"First parameter","alpha",1.0},
        {"Second parameter","beta",0.0,gtkx.range(0,1)},
        {"Name of Patient","name",'bill',gtkx.non_blank},
    print('result was',res,alpha,beta,name,gender,town,file,interested)

beta = 0.5


This puts up a nice default dialog for modifying these variables.

Code (as always) available on request!

steve d.

On Feb 17, 2008 10:14 PM, Miles Bader <> wrote:
> Duck <> writes:
> > This led me to look into the whole IUP think a bit more closely, and to
> > come up with the following questions:
> >
> > 1. The website mentions GTK-2 support, but there isn't any. Apparently
> > that's in V3, which isn't out yet. Any idea when it will be? (I'm not
> > really interested in a Motif look-and-feel if I can have a GTK one.)
> >
> > 2. Can the IUP libraries be used directly from Lua by simply doing a
> > require() of the right modules and then coding 100% in Lua?
> >
> > 3. In the interim, any ideas on what to do about the above build error?
> I dunno, I ran into the same basic issues as you, but gave up after I
> realized gtk wasn't supported in the released sources (this was the
> project, btw, that gave me such a bad impression of premake).
> You might try Wolfgang Oertl's lua-gtk though, I found it to work quite
> well:
> There are still a few bugs in random functions, but he's very responsive
> to bug reports (it seems the few things I've reported are already fixed
> in CVS).
> It's also a package in debian (sid), if you run that.
> Lua-gtk's interface is somewhat lower-level than IUP, being based on gtk
> (though slightly nicer than the raw gtk C bindings; it's more like gtkmm
> maybe).  It does seem like an IUP-like "describe nesting with tables"
> interface wouldn't be hard to build in Lua using lua-gtk as a base
> though.
> -Miles
> --
> Carefully crafted initial estimates reward you not only with
> reduced computational effort, but also with understanding and
> increased self-esteem.         -- Numerical methods in C,
>   Chapter 9. "Root Finding and Nonlinear Sets of Equations"