From 570a8267d2b264e20b3533c0012b65f8c714a2d3 Mon Sep 17 00:00:00 2001 From: Ray Greenwell Date: Sun, 28 Jan 2007 21:47:34 +0000 Subject: [PATCH] - Retain a reference to our panel in didInit(). - Cleanup. git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@159 c613c5cb-e716-0410-b11b-feb51c14d237 --- .../com/threerings/ezgame/client/EZGameController.as | 10 ++++++++-- src/as/com/threerings/ezgame/client/EZGamePanel.as | 4 ---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/as/com/threerings/ezgame/client/EZGameController.as b/src/as/com/threerings/ezgame/client/EZGameController.as index 52a7049c..9bbbccc3 100644 --- a/src/as/com/threerings/ezgame/client/EZGameController.as +++ b/src/as/com/threerings/ezgame/client/EZGameController.as @@ -65,8 +65,14 @@ public class EZGameController extends GameController override protected function createPlaceView (ctx :CrowdContext) :PlaceView { - _panel = new EZGamePanel(ctx, this); - return _panel; + return new EZGamePanel(ctx, this); + } + + override protected function didInit () :void + { + super.didInit(); + // retain a casted reference to our panel + _panel = (_view as EZGamePanel); } protected var _ezObj :EZGameObject; diff --git a/src/as/com/threerings/ezgame/client/EZGamePanel.as b/src/as/com/threerings/ezgame/client/EZGamePanel.as index 1a0f2641..b726f58a 100644 --- a/src/as/com/threerings/ezgame/client/EZGamePanel.as +++ b/src/as/com/threerings/ezgame/client/EZGamePanel.as @@ -18,8 +18,6 @@ import mx.utils.DisplayUtil; import com.threerings.util.MediaContainer; -import com.threerings.mx.controls.ChatDisplayBox; - import com.threerings.crowd.client.PlaceView; import com.threerings.crowd.data.PlaceObject; import com.threerings.crowd.util.CrowdContext; @@ -37,8 +35,6 @@ public class EZGamePanel extends VBox { _ctx = ctx; _ctrl = ctrl; - - //addChild(new ChatDisplayBox(ctx)); } // from PlaceView