Took care of some TODOs.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4440 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -5,6 +5,7 @@ import flash.utils.IDataOutput;
|
|||||||
|
|
||||||
import com.threerings.util.ClassUtil;
|
import com.threerings.util.ClassUtil;
|
||||||
import com.threerings.util.HashMap;
|
import com.threerings.util.HashMap;
|
||||||
|
import com.threerings.util.Short;
|
||||||
|
|
||||||
public class ObjectOutputStream
|
public class ObjectOutputStream
|
||||||
{
|
{
|
||||||
@@ -39,15 +40,16 @@ public class ObjectOutputStream
|
|||||||
var streamer :Streamer = Streamer.getStreamer(obj);
|
var streamer :Streamer = Streamer.getStreamer(obj);
|
||||||
// streamer may be null to indicate a Streamable object
|
// streamer may be null to indicate a Streamable object
|
||||||
if (streamer == Streamer.BAD_STREAMER) {
|
if (streamer == Streamer.BAD_STREAMER) {
|
||||||
// TODO
|
throw new Error("Unable to stream " + cname);
|
||||||
log.warning("OMG, cannot stream " + cname);
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
cmap = new ClassMapping(_nextCode++, cname, streamer);
|
cmap = new ClassMapping(_nextCode++, cname, streamer);
|
||||||
_classMap.put(cname, cmap);
|
_classMap.put(cname, cmap);
|
||||||
|
|
||||||
// TODO: if _nextCode blows short, log an error
|
if (_nextCode > Short.MAX_VALUE) {
|
||||||
|
throw new Error("Too many unique classes written to " +
|
||||||
|
"ObjectOutputStream");
|
||||||
|
}
|
||||||
|
|
||||||
writeShort(-cmap.code);
|
writeShort(-cmap.code);
|
||||||
writeUTF((streamer == null) ? Translations.getToServer(cname)
|
writeUTF((streamer == null) ? Translations.getToServer(cname)
|
||||||
@@ -85,8 +87,10 @@ public class ObjectOutputStream
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: this is equivalent to marshalling a field for which there
|
/**
|
||||||
// is a basic streamer. Work needs doing here.
|
* This is equivalent to marshalling a field for which there
|
||||||
|
* is a basic streamer.
|
||||||
|
*/
|
||||||
public function writeField (val :Object) :void
|
public function writeField (val :Object) :void
|
||||||
//throws IOError
|
//throws IOError
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -121,7 +121,7 @@ public class Communicator
|
|||||||
|
|
||||||
public function postMessage (msg :UpstreamMessage) :void
|
public function postMessage (msg :UpstreamMessage) :void
|
||||||
{
|
{
|
||||||
sendMessage(msg); // send it now: we have no out queue (TODO?)
|
sendMessage(msg); // send it now: we have no out queue
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function shutdown (logonError :Error) :void
|
protected function shutdown (logonError :Error) :void
|
||||||
|
|||||||
@@ -32,10 +32,7 @@ public /* abstract */ class DEvent
|
|||||||
*/
|
*/
|
||||||
public function applyToObject (target :DObject) :Boolean
|
public function applyToObject (target :DObject) :Boolean
|
||||||
{
|
{
|
||||||
// TODO
|
throw new Error("abstract");
|
||||||
Log.getLog(this).warning(
|
|
||||||
"DEvent.applyToTarget is really an abstract method.");
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ public class OidList
|
|||||||
// documentation inherited from interface Streamable
|
// documentation inherited from interface Streamable
|
||||||
public function writeObject (out :ObjectOutputStream) :void
|
public function writeObject (out :ObjectOutputStream) :void
|
||||||
{
|
{
|
||||||
Log.getLog(this).warning("TODO: Not implemented: " + this);
|
throw new Error();
|
||||||
}
|
}
|
||||||
|
|
||||||
// documentation inherited from interface Streamable
|
// documentation inherited from interface Streamable
|
||||||
|
|||||||
@@ -69,8 +69,10 @@ public class Config
|
|||||||
// otherwise we'll hear back in a sec
|
// otherwise we'll hear back in a sec
|
||||||
var thisConfig :Config = this;
|
var thisConfig :Config = this;
|
||||||
var listener :Function = function (evt :NetStatusEvent) :void {
|
var listener :Function = function (evt :NetStatusEvent) :void {
|
||||||
// TODO: as of beta3 there is a bug where the status
|
// TODO: There is a bug where the status is always
|
||||||
// is always "SharedObject.Flush.Failed", even on success
|
// "SharedObject.Flush.Failed", even on success, if the request
|
||||||
|
// was for a large enough storage that the player calls it
|
||||||
|
// "unlimited".
|
||||||
trace("================[" + evt.info.code + "]");
|
trace("================[" + evt.info.code + "]");
|
||||||
if ("SharedObject.Flush.Success" == evt.info.code) {
|
if ("SharedObject.Flush.Success" == evt.info.code) {
|
||||||
rl.requestCompleted(thisConfig);
|
rl.requestCompleted(thisConfig);
|
||||||
|
|||||||
Reference in New Issue
Block a user