GUI stuff?
Chris Pressey
cpressey@REDACTED
Sun May 11 03:17:12 CEST 2003
On Sun, 11 May 2003 00:59:03 +0200
"chris.danx" <chris.danx@REDACTED> wrote:
> Hi,
>
> I've been playing with Erlang for a wee while, and would like to do
> some GUI stuff. Are there any recent bindings to GTK or some other
> toolkit?
> I can only find a toolkit which hasn't had releases for a year and
> no activity (erlgtk).
>
> Are bindings hard to do? Any info available on creating a binding?
>
>
> Cheers,
> Chris
Hi Chris,
I think it depends on what kind of GUI stuff you want to do.
For simple stuff, GS, which uses Tcl/Tk and is included in the base
Erlang/OTP distribution, should be just fine.
erlgtk should also be OK for most things. It's not totally dormant; I
committed a few bug fixes just the other day... but I think the reason
there isn't much activity is because it's also fine for simple stuff,
and because the project maintainers are keeping busy with other things.
(An exception might be Windows; I know GS has had problems with it in
the past, not sure what the current situation is. And erlgtk for
Windows is getting pretty old (v0.9.0); I've been trying to coax Luke
into building a more recent version with offers of Canadian beer and
power supplies, but with little luck :)
There's also an embryonic X11 binding; it's in the Jungerl.
There's also been talk of creating a radically novel GUI in Erlang
itself, but that project is still at the "wow that's a cool idea but
where to begin" stage :)
Many people are of the opinion you should do the GUI in Java or some
other language with an emphasis on GUI, and connect it to Erlang in one
of any of a number of ways (jinterface, UBF, etc.) Whether this is a
better or worse solution probably depends on what your requirements are.
As for making bindings, I've never actually done one myself, but the
good news is that the theory is simple; it's generally like making any
other port program - see the Interoperability Tutorial in the docs.
Writing the interface by hand is of course tedious, so there are several
tools to automatically generate one; some of them, such as EDTK[1], are
rather sophisticated.
But if GTK+ 1.2 is all you need, there's no sense in making a new
binding; probably more productive to join the erlgtk project on
sourceforge (and help me bug the admins into one day bumping the
project status to Beta :)
-Chris
[1]
http://www.erlang.org/ml-archive/erlang-questions/200210/msg00058.html
More information about the erlang-questions
mailing list