A few things, now that I'm running again (I downgraded to the older beta).
I'm now pounding my head against new limitations that I'd not seen before, now that the Client class that I'm using is not in the presents.client package. Macromedia can go fuck themselves with a hot poker. The .swf is already 200k and I've barely begun working on UI elements. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3972 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -52,6 +52,10 @@ public class ObjectInputStream
|
||||
var cname :String = Translations.getFromServer(readUTF());
|
||||
Log.debug("read cname: " + cname);
|
||||
var streamer :Streamer = Streamer.getStreamerByJavaName(cname);
|
||||
if (streamer == Streamer.BAD_STREAMER) {
|
||||
Log.warning("OMG, cannot stream" + cname);
|
||||
return null;
|
||||
}
|
||||
|
||||
cmap = new ClassMapping(code, cname, streamer);
|
||||
_classMap[code] = cmap;
|
||||
|
||||
@@ -38,9 +38,9 @@ public class ObjectOutputStream
|
||||
if (cmap == null) {
|
||||
var streamer :Streamer = Streamer.getStreamer(obj);
|
||||
// streamer may be null to indicate a Streamable object
|
||||
if (streamer == null) {
|
||||
if (streamer == Streamer.BAD_STREAMER) {
|
||||
// TODO
|
||||
trace("OMG, cannot stream ", cname);
|
||||
Log.warning("OMG, cannot stream " + cname);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -18,6 +18,8 @@ import com.threerings.io.streamers.StringStreamer;
|
||||
|
||||
public class Streamer
|
||||
{
|
||||
public static const BAD_STREAMER :Streamer = new Streamer(null, null);
|
||||
|
||||
public static function getStreamer (obj :Object) :Streamer
|
||||
{
|
||||
if (obj is Streamable) {
|
||||
@@ -39,7 +41,7 @@ public class Streamer
|
||||
return streamer;
|
||||
}
|
||||
|
||||
return undefined;
|
||||
return BAD_STREAMER;
|
||||
}
|
||||
|
||||
public static function getStreamerByClass (clazz :Class) :Streamer
|
||||
@@ -56,7 +58,7 @@ public class Streamer
|
||||
}
|
||||
}
|
||||
|
||||
return undefined;
|
||||
return BAD_STREAMER;
|
||||
}
|
||||
|
||||
public static function getStreamerByJavaName (jname :String) :Streamer
|
||||
|
||||
@@ -22,6 +22,7 @@ public class MsoyContext
|
||||
|
||||
// TODO: verify params to these constructors
|
||||
_msgmgr = new MessageManager("rsrc");
|
||||
_locdir = new LocationDirector(this);
|
||||
_chatdir = new ChatDirector(this, _msgmgr, "general");
|
||||
}
|
||||
|
||||
@@ -40,7 +41,7 @@ public class MsoyContext
|
||||
// documentation inherited from interface CrowdContext
|
||||
public function getLocationDirector () :LocationDirector
|
||||
{
|
||||
return null; // TODO
|
||||
return _locdir;
|
||||
}
|
||||
|
||||
// documentation inherited from interface CrowdContext
|
||||
@@ -71,6 +72,8 @@ public class MsoyContext
|
||||
|
||||
protected var _msgmgr :MessageManager;
|
||||
|
||||
protected var _locdir :LocationDirector;
|
||||
|
||||
protected var _chatdir :ChatDirector;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ import com.threerings.presents.Log;
|
||||
* This class is used by the InvocationDirector to subscribe
|
||||
* to the client object.
|
||||
*/
|
||||
internal class ClientSubscriber implements Subscriber
|
||||
public class ClientSubscriber implements Subscriber
|
||||
{
|
||||
public function ClientSubscriber (invdir :InvocationDirector)
|
||||
{
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.threerings.presents.client {
|
||||
|
||||
import mx.collections.IViewCursor;
|
||||
import mx.collections.ListCollectionView;
|
||||
import mx.collections.ArrayCollection;
|
||||
|
||||
import com.threerings.util.SimpleMap;
|
||||
|
||||
@@ -35,15 +35,6 @@ public class InvocationDirector
|
||||
_omgr = omgr;
|
||||
_client = client;
|
||||
|
||||
var subby :Object = new Object();
|
||||
subby.objectAvailable = function (obj :DObject) :void {
|
||||
gotClientObject(obj as ClientObject);
|
||||
}
|
||||
subby.requestFailed = function (
|
||||
oid :int, cause :ObjectAccessError) :void {
|
||||
gotClientObjectFailed(oid, cause);
|
||||
}
|
||||
|
||||
_omgr.subscribeToObject(cloid, new ClientSubscriber(this));
|
||||
}
|
||||
|
||||
@@ -364,7 +355,7 @@ public class InvocationDirector
|
||||
|
||||
/** All registered receivers are maintained in a list so that we can
|
||||
* assign receiver ids to them when we go online. */
|
||||
internal var _reclist :ListCollectionView = new ListCollectionView();
|
||||
internal var _reclist :ArrayCollection = new ArrayCollection();
|
||||
|
||||
/** The last time we flushed our listeners. */
|
||||
protected var _lastFlushTime :Number;
|
||||
|
||||
Reference in New Issue
Block a user