Eventmanager?

David Crawshaw <[email protected]> Mon, 5 Apr 2004 08:53:08 +1000
Newsgroups gmane.comp.java.xwt.widgets
Message-ID <[email protected]>
I'm a little unsure what the Eventmanager is all about, specifically 
the function surface.addEvent.

Why is this necessary? Can't we just have it that the Eventmanager maps 
all the major events from whatever root box it's applied to to the 
surface object, so other boxes can just trap events on the surface 
object?

Eg:

eventmanager.t:
var mapevent = function(v) { surface[trapname] = v; }
Release1 ++= mapevent;
Click1 ++= mapevent;
...

label.t (For example):
surface.Release1 ++= function(v) {
    ... my code that runs on release, even if release occurs
        outside of the label box...
}

Wouldn't this be a lot simpler?

-- d