From 9668e9549597ac85a05bb857521cc89117466c3f Mon Sep 17 00:00:00 2001 From: Tony Garnock-Jones Date: Fri, 27 Sep 2013 10:36:51 -0400 Subject: [PATCH] Fix scope error; start on Ground --- marketplace.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/marketplace.js b/marketplace.js index 7e3f634..34f74e4 100644 --- a/marketplace.js +++ b/marketplace.js @@ -270,7 +270,7 @@ World.prototype.performAction = function (pid, action) { case "spawn": var pid = this.nextPid++; this.processTable[pid] = { routes: action.initialRoutes, behavior: action.behavior }; - if (behavior.boot) { this.asChild(pid, function () { behavior.boot() }); } + if (action.behavior.boot) { this.asChild(pid, function () { action.behavior.boot() }); } this.issueRoutingUpdate(); break; case "routes": @@ -327,3 +327,13 @@ World.prototype.handleEvent = function (e) { event: e }; } }; + +/*---------------------------------------------------------------------------*/ +/* Ground interface */ + +function Ground(bootActions) { + this.world = new World(bootActions); + this.subscriptions = {}; +} + +// HERE: Ground.prototype. \ No newline at end of file