ex11 widget standardization
yerl@REDACTED
yerl@REDACTED
Tue May 10 17:45:32 CEST 2005
See how to install it here:
http://yhafri.club.fr/crux/ex11/Pkgfile
/yerl
----Message d'origine----
>Date: Tue, 10 May 2005 10:19:46 +0100
>De: Peter-Henry Mander <erlang@REDACTED>
>A: "Joe Armstrong (AL/EAB)" <joe.armstrong@REDACTED>
>Copie à: erlang-questions@REDACTED
>Sujet: Re: ex11 widget standardization
>
>Hi Joe,
>
>Another (potential) ex11 user here. I wonder what happened to ex11 since
>the day you mentioned a wish back-end?
>
>I'm having trouble getting the latest snapshot I have
>(ex11-latest-snapshot-2004-09-09.tgz) working on an AMD64 laptop. It
>works well on a i386 platform with Kostis' HiPE snapshot
>(otp-20050202-1824.tar.gz).
>
>Admittedly the AMD64 machine has some niggles, SuSE 9.2 on AMD64 doesn't
>seem to be well tested.
>
>I get the following output ...
>
>Eshell V5.4.3 (abort with ^G)
>1> erl -pa '../lib' -pa '../unixdom-0.1/ebin/' -s example0 start
>Erlang (BEAM) emulator version 5.4.3 [64-bit] [source] [hipe]
>
>Trying Host=unix Display=0 Screen=0
>Connecting to unix domain socket:0
>Eshell V5.4.3 (abort with ^G)
>1> Port opened sending cookie:
>Trying Host={ip,"localhost"} Display=0 Screen=0
>Connecting to tcp port:6000
>cannot connect reason:econnrefused
>Trying Host={ip,"localhost"} Display=0 Screen=0
>Connecting to tcp port:6000
>cannot connect reason:econnrefused
>Trying Host=unix Display=0 Screen=0
>Connecting to unix domain socket:0
>Port opened sending cookie:
>
>.... at which point it just sits completely still.
>
>I noticed this was described before on erlang-questions. Was there a
>work-around?
>
>Pete.
>
>
>On Thu, 3 Feb 2005 13:26:08 +0100
>"Joe Armstrong (AL/EAB)" <joe.armstrong@REDACTED> wrote:
>
>>
>> Wow - a user :-)
>>
>> Overall strategy:
>>
>> 1) Fix a reasonably intuitive way of programming GUIs
>> 2) Prototype it
>> 3a) *Define* a graphics GUI protocol
>> 3a) *Define* a look-and-feel
>> 4) Implement it
>> 1)
>>
>> For many years I didn't really know how graphics should be programmed
>> Callbacks suck - in early attempts I made
>>
>> One window = One processes
>>
>> With "if the process dies the widow dies and vice versa" semantics.
>>
>> This is wrong.
>>
>> EX11 convinced me that the correct model is
>>
>> One process per object in a hierarchical tree
>> Expose protocols towards the objects and NOT APIs
>>
>> So in ex11 *everything* is a process buttons, sliders, entries, ...
>> all are processes.
>>
>> All obey a generic protocol and a private protocol.
>>
>> So all objects can be moved with an Obj ! {move,X,Y} message
>>
>> Active objects (buttons etc) can be sent functions
>>
>> Button ! {onClick, Fun}
>>
>> Meaning evaluate F() when you click on the button
>>
>> etc.
>>
>> Irrespective of the underlying model (wish, gtk, X11) the Erlang programmer
>> should perceive a GUI as a collection of communicating processes.
>>
>> IMHO this makes for a highly intuitive and easy to program way of making GUIS.
>>
>> << It's rather like the OO way of programming a GUI where EVERY control is
>> an object - here every control is a process>>
>>
>> 2)
>>
>> Ex11 works reasonably well but not out-of-the-box on all
>> makes and flavours of X11 and displays (in particular
>> color handling on non 24 bit color displays)
>>
>>
>> 3a) The protocol should be something like this
>> This is a summary of some of http://www.sics.se/~joe/ex11/widgets/ex11.html
>>
>> Win !! {makeButton, X, Y, Width, Ht, Color, Str) => Button
>> Button ! {onClick, Fun/1} - Evaluate F(X) when clicked. X is the mouse position.
>> Button ! {set, Str} Change the text in the button
>>
>> Win !! {makeDragBox, X, Y, Width, Height, Border, Color) => DragBox
>> DragBox ! {onDrag, F/2} evaluate F(X,Y) when dragged to X,Y
>>
>> Win !! {makeEntry, X, Y, Width, Str) => Entry
>> Entry ! {onReturn, Fun/1} - Evaluate F(Str) when return is pressed in the entry.
>> Entry ! {set, Str} Set the entry
>> Entry !! read => Str Read the entry
>>
>> ...
>>
>> Win Button Entry DragBox etc are all processes
>>
>> !! is an infix RPC. A !! B => C is short for C = rpc(A, B)
>>
>> 3b) Needs help from a graphics designer
>>
>> 4)
>> EX11 is non portable to windows (ie based on X11) and has certain problems
>> in starting up (ie handling non 24 bit color displays)
>>
>> I started three days ago (by coincidence) seeing if I could use a wish
>> backend to ex11 - this works very nicely, I am half way through the widgets
>> and have managed to retain ex11 programming model.
>>
>> 5) Volunteers
>>
>> I would like volunteers for the following:
>>
>> a) test my new graphics stuff and help with
>> TCL widget programming (any TCL buffs out there)
>> b) test run my new stuff on windows and package with
>> freewrap
>> c) Discuss and help maintain the widget protocol spec
>> d) Provide inputs for graphics look-and-feel
>> e) implement the entire protocols with *different*
>> back-ends (ie GTK/xwwidgets etc.)
>>
>> Anybody who is interested please mail me
>>
>> (Oh and there is also a sub-project) The Erlang desktop (like smalltalk)
>>
>> /Joe
>>
>>
>--
>"The Tao of Programming
> flows far away
> and returns
> on the wind of morning."
>
>
More information about the erlang-questions
mailing list