More GUI (ravings?)

Vlad Dumitrescu (EAW) <>
Mon Mar 3 17:18:49 CET 2003

>  Hmmm, its a hard problem. The following is after very
> little thought so take that into account. I would
> think you would have a single process that would
> handle the actual drawings to screen. <<snipped>>

Yes, something like that, but that was not the problem (or I misunderstood you).

The problem is how to define these event handlers without heaps of copy-and-paste, and also how the plumbing between events and the corresponding response (signals and slots maybe?) should be done.

The first problem is illusterated by an example: a widget is represented by a process. All widgets share some common behaviour - that might be implemented by the widget.erl module. Now a specific widget, let's say an InputField, has to redefine some of this behaviour, for example key presses it grabs have to be displayed. This can be done by a) copying widget.erl and replacing the affected code; b) somehow only specifying what's changed and referring to widget.erl for the rest. This will happen in several levels, for example a PasswordInputField that will display it's content as stars. Thus a hierarchy is implicitly defined.

As you say, this needs a lot of thinking! :-)

More information about the erlang-questions mailing list