Create controllers in the new way (actionscript wants to be all growed up
just like uncle Java!). git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4028 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -313,18 +313,13 @@ public class LocationDirector extends BasicDirector
|
||||
_placeId = placeId;
|
||||
|
||||
// check whether we should use a custom class loader
|
||||
var cclass :Class = config.getControllerClass();
|
||||
try {
|
||||
// start up a new place controller to manage the new place
|
||||
_controller = (new cclass() as PlaceController);
|
||||
_controller.init(_cctx, config);
|
||||
|
||||
} catch (e :Error) {
|
||||
Log.warning("Error creating or initializing place controller " +
|
||||
"[cclass=" + cclass +
|
||||
", config=" + config + "].");
|
||||
Log.logStackTrace(e);
|
||||
_controller = config.createController();
|
||||
if (_controller == null) {
|
||||
Log.warning("Place config returned null controller " +
|
||||
"[config=" + config + "].");
|
||||
return;
|
||||
}
|
||||
_controller.init(_cctx, config);
|
||||
|
||||
// subscribe to our new place object to complete the move
|
||||
_cctx.getDObjectManager().subscribeToObject(_placeId, this);
|
||||
|
||||
Reference in New Issue
Block a user