lua-users home
lua-l archive

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


Ok, since I believe this to be of interest, I will go into each point...

On Sat, 28 Feb 2004, Clemens Wacha wrote:
> - its already there
> - supports linux and windows

IUP fits well into the Lua paradigm because it handles 
all attributes as strings. Suppose you had methods and methods to 
change each and every UI feature? You would have to export everything to
Lua. The string approach is straightforward; *nothing* in the
binding is altered to create a new attribute.

> cons:
> - library not available to debian

You mean, not compiled to debian? Other from that, it should work fine.

> - doesn't comply to LTN7

Shouldn't be hard to comply. I still have not aswered when is it planned
to be implemented.. :P

> -  be creation of dialogs buttons and so on is much more difficult as 
with
> tcl/tk (which is not good for people who have never programmed before!)
>
> simple means this in lua:
> 
> guiinit = loadlib("./guilib.a", "init")
> guiinit()

Looks simple enough. Shouldn't be hard to do that with LoadLibrary.
You need to call IupOpen() and iuplua_open(lua_State*).

> function button1_click()
>   print("edit contains this text: "..edit1.text)
> end
> 
> -- no need to create the first window because its already there! 
> button1 = gui.button("my buttontext", button1_click)
> edit1 = gui.textedit()

What if you want to change a feature of the window.. how do you do it?
Besides, you could want two or three windows... why not?

In IUPLua you would do:

button1 = iupbutton{title="my buttontext", action=button1_click}
edit1 = iuptext{}

It is a function call, in which you pass a table with the attributes
you want to set. The ones you don't, can be set later.

> -- all gui elements that are created have intelligent defaults set
> -- of course you can change the attribute after creating the elements
> button1.enable = 0
> edit1.multiline = 1

Sure, makes things easier. It is exactly like that in IUP.
 
> -- as an alternative you could also add a function to the gui lib that
> -- automatically shortens the gui names:
> -- gui.simplenames() would do something like this:
> 
> button = gui.button
> textedit = gui.textedit
> -- etc.

Should be easy to do once IUP implements LTN7.

> -- The problem of the gui layout can be solved by a function that is
> -- able to load xml files from glade or wxwindows editors
> 
> gui.loadlayout("./MyEditor.glade")

IUP initially had a "script language" called LED to help creating dialogs.
Of course, when Lua was released we switched to Lua. I believe what you
are missing is a graphic interface to build your dialog, right? 

We had some implementations of a graphic tool to build dialogs, but
our users, even the less experienced ones, at the long run preferred the
scripting method...

What I believe the Lua comminity should look is what features are of
importance in the Toolkit, whether to use abstract/concrete layout for
example... Note that no Toolkit so far offers a complete solution (or
we wouldn't be having this discussion) :)

Regards,
Mark