The wrapper project
Taavi Talvik
taavi@REDACTED
Thu Aug 21 17:39:05 CEST 2003
On Thu, 21 Aug 2003, Joe Armstrong wrote:
> Having defined the *protocols* the components can be implements and
> distributed for different OSs.
>
> I am currently pursuing this idea. My first component should be a
> control wrapper round wxWindows so we can do GUI's - NOTE my view is
> that the GUI is itself a *component* which is isolated from the
> application which should be another component.
>
> (Thus controlling mplayer needs two components and one control
> process - The GUI component, the mplayer component, and a semantics
> process).
>
> As proof of concept it would be nice is somebody felt the urge to
> write a component according to this model.
I have been playing around with gtk binding built up similiar way.
(look at http://home.uninet.ee/~taavi/files/erlang/xgs/).
Basicly port driver with following interface:
Object = create(Parent_object, "object_type"),
config(Object,[{"parameter","value"}]),
Paramter = read(Object, "parameter"),
destroy(Object)
However there are some issue I have stumbled upon:
1. Probably most gtk components/widgets should be quite high level
and probably it erlang can only use them and not construct new
ones. This is due to gtk callback model - constructing new widgets
requires complex callbacks. For just using widgets events are
enough.
2. Garbage collection. When object in erlang is garbage collected
there is no way to inform foreign component.
3. Communicating data structures and efficient acces to them. For
example - I can send deep list to gtk and display tree. However
for modification are two options: either resend everything or
design efficient foreign data access protocol (which adds
tremendous complexity).
best regards,
taavi
More information about the erlang-questions
mailing list