diff --git a/src/as/com/threerings/crowd/client/LocationDirector.as b/src/as/com/threerings/crowd/client/LocationDirector.as index b8ee7ea48..09e08defe 100644 --- a/src/as/com/threerings/crowd/client/LocationDirector.as +++ b/src/as/com/threerings/crowd/client/LocationDirector.as @@ -447,7 +447,6 @@ public class LocationDirector extends BasicDirector // obtain our service handle _lservice = (client.requireService(LocationService) as LocationService); - Log.info("location service: " + _lservice); } protected function gotBodyObject (clobj :BodyObject) :void diff --git a/src/as/com/threerings/crowd/data/LocationMarshaller.as b/src/as/com/threerings/crowd/data/LocationMarshaller.as index 19a57bddc..6d0f82dfb 100644 --- a/src/as/com/threerings/crowd/data/LocationMarshaller.as +++ b/src/as/com/threerings/crowd/data/LocationMarshaller.as @@ -55,7 +55,6 @@ public class LocationMarshaller extends InvocationMarshaller // documentation inherited from interface public function moveTo (arg1 :Client, arg2 :int, arg3 :MoveListener) :void { - com.threerings.crowd.Log.debug("issuing moveTo: " + _invCode); var listener3 :MoveMarshaller = new MoveMarshaller(); listener3.listener = arg3; sendRequest(arg1, MOVE_TO, [ new Integer(arg2), listener3 ]); diff --git a/src/as/com/threerings/crowd/data/PlaceObject.as b/src/as/com/threerings/crowd/data/PlaceObject.as index 958e904aa..d8c05417b 100644 --- a/src/as/com/threerings/crowd/data/PlaceObject.as +++ b/src/as/com/threerings/crowd/data/PlaceObject.as @@ -24,6 +24,9 @@ package com.threerings.crowd.data { import com.threerings.util.Iterator; import com.threerings.util.Name; +import com.threerings.io.ObjectInputStream; +import com.threerings.io.ObjectOutputStream; + import com.threerings.presents.dobj.DObject; import com.threerings.presents.dobj.DSet; import com.threerings.presents.dobj.DSetEntry; @@ -175,5 +178,24 @@ public class PlaceObject extends DObject this.speakService = value; } // AUTO-GENERATED: METHODS END + + // documentation inherited + public override function writeObject (out :ObjectOutputStream) :void + { + super.writeObject(out); + out.writeObject(occupants); + out.writeObject(occupantInfo); + out.writeObject(speakService); + } + + // documentation inherited + public override function readObject (ins :ObjectInputStream) :void + { + super.readObject(ins); + // TODO: this needs fixing! + occupants = (ins.readField(OidList) as OidList); + occupantInfo = (ins.readField(DSet) as DSet); + speakService = (ins.readField(SpeakMarshaller) as SpeakMarshaller); + } } } diff --git a/src/as/com/threerings/io/ObjectInputStream.as b/src/as/com/threerings/io/ObjectInputStream.as index c92f6af44..a54085a04 100644 --- a/src/as/com/threerings/io/ObjectInputStream.as +++ b/src/as/com/threerings/io/ObjectInputStream.as @@ -125,6 +125,10 @@ public class ObjectInputStream ? Streamer.getStreamerByClass(type as Class) : Streamer.getStreamerByJavaName(type as String); + if (streamer == Streamer.BAD_STREAMER) { + throw new Error("Cannot field stream " + type); + } + var obj :Object = streamer.createObject(this); streamer.readObject(obj, this); return obj; diff --git a/src/as/com/threerings/io/ObjectOutputStream.as b/src/as/com/threerings/io/ObjectOutputStream.as index 5353d57e1..3eb63cec3 100644 --- a/src/as/com/threerings/io/ObjectOutputStream.as +++ b/src/as/com/threerings/io/ObjectOutputStream.as @@ -50,9 +50,6 @@ public class ObjectOutputStream // TODO: if _nextCode blows short, log an error writeShort(-cmap.code); - Log.debug("wrote classname: " + - ((streamer == null) ? Translations.getToServer(cname) - : streamer.getJavaClassName())); writeUTF((streamer == null) ? Translations.getToServer(cname) : streamer.getJavaClassName()); diff --git a/src/as/com/threerings/io/streamers/ObjectArrayStreamer.as b/src/as/com/threerings/io/streamers/ObjectArrayStreamer.as index 642655184..153df8d54 100644 --- a/src/as/com/threerings/io/streamers/ObjectArrayStreamer.as +++ b/src/as/com/threerings/io/streamers/ObjectArrayStreamer.as @@ -30,7 +30,6 @@ public class ObjectArrayStreamer extends Streamer :void { var arr :Array = (obj as Array); - com.threerings.presents.Log.debug("array length: " + arr.length); out.writeInt(arr.length); for (var ii :int = 0; ii < arr.length; ii++) { out.writeObject(arr[ii]); diff --git a/src/as/com/threerings/msoy/client/MsoyClient.as b/src/as/com/threerings/msoy/client/MsoyClient.as index f44e3ba9b..7f561fe44 100644 --- a/src/as/com/threerings/msoy/client/MsoyClient.as +++ b/src/as/com/threerings/msoy/client/MsoyClient.as @@ -2,6 +2,8 @@ package com.threerings.msoy.client { import flash.display.Stage; +import mx.core.Application; + import com.threerings.util.Name; import com.threerings.presents.client.Client; import com.threerings.presents.dobj.DSet; @@ -24,11 +26,11 @@ import com.threerings.msoy.data.SimpleChatConfig; public class MsoyClient extends Client { - public function MsoyClient (stage :Stage) + public function MsoyClient (app :Application) { super(new UsernamePasswordCreds(new Name("guest"), "guest")); - _ctx = new MsoyContext(this, stage); + _ctx = new MsoyContext(this, app); setServer("tasman.sea.earth.threerings.net", DEFAULT_SERVER_PORT); logon(); diff --git a/src/as/com/threerings/msoy/client/MsoyContext.as b/src/as/com/threerings/msoy/client/MsoyContext.as index 4c95c50cb..1e53942a1 100644 --- a/src/as/com/threerings/msoy/client/MsoyContext.as +++ b/src/as/com/threerings/msoy/client/MsoyContext.as @@ -3,6 +3,8 @@ package com.threerings.msoy.client { import flash.display.DisplayObject; import flash.display.Stage; +import mx.core.Application; + import com.threerings.util.MessageManager; import com.threerings.presents.client.Client; @@ -19,10 +21,10 @@ import com.threerings.crowd.chat.client.ChatDirector; public class MsoyContext implements CrowdContext { - public function MsoyContext (client :Client, stage :Stage) + public function MsoyContext (client :Client, app :Application) { _client = client; - _stage = stage; + _app = app; // TODO: verify params to these constructors _msgmgr = new MessageManager("rsrc"); @@ -63,22 +65,22 @@ public class MsoyContext // documentation inherited from interface CrowdContext public function setPlaceView (view :PlaceView) :void { - for (var ii :int = _stage.numChildren - 1; ii >= 0; ii--) { - _stage.removeChildAt(ii); + for (var ii :int = _app.numChildren - 1; ii >= 0; ii--) { + _app.removeChildAt(ii); } - _stage.addChild(view as DisplayObject); + _app.addChild(view as DisplayObject); } // documentation inherited from interface CrowdContext public function clearPlaceView (view :PlaceView) :void { - _stage.removeChild(view as DisplayObject); + _app.removeChild(view as DisplayObject); } protected var _client :Client; - protected var _stage :Stage; + protected var _app :Application; protected var _msgmgr :MessageManager;