ex11 - brain dump 1.1
Vlad Dumitrescu
vlad_dumitrescu@REDACTED
Wed Jan 14 11:38:03 CET 2004
[Note: is this discussion of general interest? Should we move it some other
place? Maybe a separate mailing list, or the wiki?]
> method 3)
> Junk the callbacks.
> I now send a
> {onevent, Win, Type, Pid, Tag}
> message to the server
> This means:
> If event Type occurs in Win then execute
> Pid ! {Tag, Event}
> This *cannot* fail for any reason
The handling of the event can still fail, of course (if as in the example, Pid
is self()) ;-)
In real life, the handling will be done by a separate process.
It is also easy to hook new functionality, by just changing the referred process
(which should get the pid of the old handler, so that the old functionality will
still be available)
[Maybe it is better to have this process' identity stored in the widget state,
to be used as a default value?]
/Vlad
More information about the erlang-questions
mailing list