diff --git a/src/as/com/threerings/io/ObjectInputStream.as b/src/as/com/threerings/io/ObjectInputStream.as index 4f4ec573f..af098eb34 100644 --- a/src/as/com/threerings/io/ObjectInputStream.as +++ b/src/as/com/threerings/io/ObjectInputStream.as @@ -103,9 +103,8 @@ public class ObjectInputStream } } - // TODO: of course this DOESN'T ACTUALLY WORK, because the actual object - // to read could be a subclass of the specified class - // TODO + // TODO: this is the equivalent of marshalling something for which + // we have a basic streamer. Fill out with all the java types public function readField (clazz :Class) :* //throws IOError { diff --git a/src/as/com/threerings/io/ObjectOutputStream.as b/src/as/com/threerings/io/ObjectOutputStream.as index 08150c476..01f02750a 100644 --- a/src/as/com/threerings/io/ObjectOutputStream.as +++ b/src/as/com/threerings/io/ObjectOutputStream.as @@ -76,6 +76,8 @@ public class ObjectOutputStream } } + // TODO: this is equivalent to marshalling a field for which there + // is a basic streamer. Work needs doing here. public function writeField (val :*) :void //throws IOError { diff --git a/src/as/com/threerings/presents/dobj/CompoundEvent.as b/src/as/com/threerings/presents/dobj/CompoundEvent.as index ab722bfca..1fd3ff7a6 100644 --- a/src/as/com/threerings/presents/dobj/CompoundEvent.as +++ b/src/as/com/threerings/presents/dobj/CompoundEvent.as @@ -158,13 +158,13 @@ public class CompoundEvent extends DEvent public override function writeObject (out :ObjectOutputStream) :void { super.writeObject(out); - out.writeField(_events); + out.writeObject(_events); } public override function readObject (ins :ObjectInputStream) :void { super.readObject(ins); - _events = ins.readField(StreamableArrayList); + _events = ins.readObject(); } /** The object manager that we'll post ourselves to when we're diff --git a/src/as/com/threerings/presents/dobj/ElementUpdatedEvent.as b/src/as/com/threerings/presents/dobj/ElementUpdatedEvent.as index 85d3e4983..235d90f17 100644 --- a/src/as/com/threerings/presents/dobj/ElementUpdatedEvent.as +++ b/src/as/com/threerings/presents/dobj/ElementUpdatedEvent.as @@ -81,7 +81,7 @@ public class ElementUpdatedEvent extends NamedEvent public override function writeObject (out :ObjectOutputStream) :void { super.writeObject(out); - out.writeField(_value); + out.writeObject(_value); out.writeInt(_index); } @@ -89,7 +89,7 @@ public class ElementUpdatedEvent extends NamedEvent public override function readObject (ins :ObjectInputStream) :void { super.readObject(ins); - _value = ins.readField(Object); + _value = ins.readObjct(); _index = ins.readInt(); } diff --git a/src/as/com/threerings/presents/dobj/EntryAddedEvent.as b/src/as/com/threerings/presents/dobj/EntryAddedEvent.as index 0c7b5dbe4..d5ef5baf0 100644 --- a/src/as/com/threerings/presents/dobj/EntryAddedEvent.as +++ b/src/as/com/threerings/presents/dobj/EntryAddedEvent.as @@ -71,13 +71,13 @@ public class EntryAddedEvent extends NamedEvent public override function writeObject (out :ObjectOutputStream) :void { super.writeObject(out); - out.writeField(_entry); + out.writeObject(_entry); } public override function readObject (ins :ObjectInputStream) :void { super.readObject(ins); - _entry = ins.readField(DSetEntry); + _entry = ins.readObject(); } protected var _entry :DSetEntry; diff --git a/src/as/com/threerings/presents/dobj/EntryRemovedEvent.as b/src/as/com/threerings/presents/dobj/EntryRemovedEvent.as index 18a2b91b8..fb053b049 100644 --- a/src/as/com/threerings/presents/dobj/EntryRemovedEvent.as +++ b/src/as/com/threerings/presents/dobj/EntryRemovedEvent.as @@ -90,13 +90,13 @@ public class EntryRemovedEvent extends NamedEvent public override function writeObject (out :ObjectOutputStream) :void { super.writeObject(out); - out.writeField(_key); + out.writeObject(_key); } public override function readObject (ins :ObjectInputStream) :void { super.readObject(ins); - _key = ins.readField(Comparable); + _key = ins.readObject(); } protected var _key :Comparable; diff --git a/src/as/com/threerings/presents/dobj/EntryUpdatedEvent.as b/src/as/com/threerings/presents/dobj/EntryUpdatedEvent.as index d991ebd43..1286a83cf 100644 --- a/src/as/com/threerings/presents/dobj/EntryUpdatedEvent.as +++ b/src/as/com/threerings/presents/dobj/EntryUpdatedEvent.as @@ -89,13 +89,13 @@ public class EntryUpdatedEvent extends NamedEvent public override function writeObject (out :ObjectOutputStream) :void { super.writeObject(out); - out.writeField(_entry); + out.writeObject(_entry); } public override function readObject (ins :ObjectInputStream) :void { super.readObject(ins); - _entry = ins.readField(DSetEntry); + _entry = ins.readObject(); } protected var _entry :DSetEntry; diff --git a/src/as/com/threerings/presents/net/AuthRequest.as b/src/as/com/threerings/presents/net/AuthRequest.as index 74849856c..6206628ae 100644 --- a/src/as/com/threerings/presents/net/AuthRequest.as +++ b/src/as/com/threerings/presents/net/AuthRequest.as @@ -22,7 +22,7 @@ public class AuthRequest extends UpstreamMessage { super.writeObject(out); - out.writeField(_creds); + out.writeObject(_creds); out.writeField(_version); } @@ -30,7 +30,7 @@ public class AuthRequest extends UpstreamMessage public function readObject (ins :ObjectInputStream) :void { super.readObject(ins); - _creds = ins.readField(Credentials); + _creds = ins.readObject(); _version = ins.readField(String); } diff --git a/src/as/com/threerings/presents/net/AuthResponse.as b/src/as/com/threerings/presents/net/AuthResponse.as index e33d64375..5c55b3d42 100644 --- a/src/as/com/threerings/presents/net/AuthResponse.as +++ b/src/as/com/threerings/presents/net/AuthResponse.as @@ -13,7 +13,7 @@ public class AuthResponse extends DownstreamMessage public function readObject (ins :ObjectInputStream) :void { super.readObject(ins); - _data = ins.readField(AuthResponseData); + _data = ins.readObject(); } protected var _data :AuthResponseData; diff --git a/src/as/com/threerings/presents/net/BootstrapData.as b/src/as/com/threerings/presents/net/BootstrapData.as index c3b98afa3..8b14ee930 100644 --- a/src/as/com/threerings/presents/net/BootstrapData.as +++ b/src/as/com/threerings/presents/net/BootstrapData.as @@ -32,7 +32,7 @@ public class BootstrapData public function readObject (ins :ObjectInputStream) :void { clientOid = ins.readInt(); - services = ins.readField(StreamableArrayList); + services = ins.readObject(); } } } diff --git a/src/as/com/threerings/presents/net/BootstrapNotification.as b/src/as/com/threerings/presents/net/BootstrapNotification.as index d0520283d..ea22c4b64 100644 --- a/src/as/com/threerings/presents/net/BootstrapNotification.as +++ b/src/as/com/threerings/presents/net/BootstrapNotification.as @@ -12,7 +12,7 @@ public class BootstrapNotification extends DownstreamMessage public function readObject (ins :ObjectInputStream) :void { super.readObject(ins); - _data = ins.readField(BootstrapData); + _data = ins.readObject(); } /** The data associated with this notification. */ diff --git a/src/as/com/threerings/presents/net/ForwardEventRequest.as b/src/as/com/threerings/presents/net/ForwardEventRequest.as index a8e28b956..2a88ccd59 100644 --- a/src/as/com/threerings/presents/net/ForwardEventRequest.as +++ b/src/as/com/threerings/presents/net/ForwardEventRequest.as @@ -47,13 +47,13 @@ public class ForwardEventRequest extends UpstreamMessage public override function writeObject (out :ObjectOutputStream) :void { super.writeObject(out); - out.writeField(_event); + out.writeObject(_event); } public override function readObject (ins :ObjectInputStream) :void { super.readObject(ins); - _event = ins.readField(DEvent); + _event = ins.readObject(); } public override function toString () :String diff --git a/src/as/com/threerings/util/Name.as b/src/as/com/threerings/util/Name.as index 97c27991f..5a20c7199 100644 --- a/src/as/com/threerings/util/Name.as +++ b/src/as/com/threerings/util/Name.as @@ -49,35 +49,14 @@ public class Name extends Object public function writeObject (out :ObjectOutputStream) :void //throws IOError { - /* - // TODO: oh shit, this is wrong. We need to write a boolean out - // indicating whether the object that follows is null or not - out.writeBareObject(_name); - */ - out.writeField(_name); - - // we need a way of doing the following automatically: - /* - var b :Boolean = (_name != null); - out.writeBoolean(b); - if (b) { - out.writeUTF(_name); - } - */ } // documentation inherited from interface Streamable public function readObject (ins :ObjectInputStream) :void //throws IOError { - // TODO: oh shit, this is wrong _name = ins.readField(String); - - /* - var b :Boolean = in.readBoolean(); - _name = b ? in.readUTF() : null; - */ } protected function normalize (txt :String) :String