CEventPump.routeEvent Member

Syntax

object.routeEvent(e);

Arguments

ArgumentSummary
e

Returns

Remarks

See Also

Source Code

function ep_routeevent (e)
{
var count = 0;
this.currentEvent = e;
e.level = 0;
while (e.destObject)
{
e.level++;
this.onHook (e);
var destObject = e.destObject;
e.currentObject = destObject;
e.destObject = (void 0);
switch (typeof destObject[e.destMethod])
{
case "function":
if (1)
try
{
destObject[e.destMethod] (e);
}
catch (ex)
{
if (typeof ex == "string")
{
dd ("Error routing event " + e.set + "." +
e.type + ": " + ex);
}
else
{
dd ("Error routing event " + e.set + "." +
e.type + ": " + dumpObjectTree(ex) +
" in " + e.destMethod + "\n" + ex);
if ("stack" in ex)
dd(ex.stack);
}
}
else
destObject[e.destMethod] (e);
if (count++ > this.MAX_EVENT_DEPTH)
throw "Too many events in chain";
break;
case "undefined":
//dd ("** " + e.destMethod + " does not exist.");
break;
default:
dd ("** " + e.destMethod + " is not a function.");
}
if ((e.type != "event-end") && (!e.destObject))
{
e.lastSet = e.set;
e.set = "eventpump";
e.lastType = e.type;
e.type = "event-end";
e.destMethod = "onEventEnd";
e.destObject = this;
}
}
delete this.currentEvent;
return true;
}