Updated to match API changes in Beta3.

InvocationRegistration had a constructor called Registration. I wonder if
that was causing the compile error with beta2.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4104 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Ray Greenwell
2006-05-09 23:03:47 +00:00
parent ff674f818f
commit e100ef4faf
39 changed files with 101 additions and 85 deletions
@@ -5,7 +5,7 @@ import flash.display.Stage;
import flash.events.EventDispatcher;
import flash.events.TimerEvent;
import flash.util.Timer;
import flash.utils.Timer;
import com.threerings.util.ObserverList;
@@ -123,7 +123,7 @@ public class Client extends EventDispatcher
return _version;
}
public function setVersion (version :String)
public function setVersion (version :String) :void
{
_version = version;
}
@@ -270,7 +270,7 @@ public class Client extends EventDispatcher
return;
}
var now :uint = flash.util.getTimer();
var now :uint = flash.utils.getTimer();
if (now - _comm.getLastWrite() > PingRequest.PING_INTERVAL) {
_comm.postMessage(new PingRequest());
}
@@ -23,7 +23,7 @@ package com.threerings.presents.client {
import flash.events.Event;
import flash.events.TimerEvent;
import flash.util.Timer;
import flash.utils.Timer;
import mx.collections.IList;
@@ -5,8 +5,8 @@ import flash.events.IOErrorEvent;
import flash.net.Socket;
import flash.util.ByteArray;
import flash.util.Endian;
import flash.utils.ByteArray;
import flash.utils.Endian;
import com.threerings.util.Util;
@@ -135,7 +135,7 @@ public class Communicator
*/
internal function updateWriteStamp () :void
{
_lastWrite = flash.util.getTimer();
_lastWrite = flash.utils.getTimer();
}
/**
@@ -70,7 +70,8 @@ public class InvocationDirector
public function unregisterReceiver (receiverCode :String) :void
{
// remove the receiver from the list
for (var iter :IViewCursor = _reclist.getCursor(); iter.moveNext(); ) {
for (var iter :IViewCursor = _reclist.createCursor();
iter.moveNext(); ) {
var decoder :InvocationDecoder =
(iter.current as InvocationDecoder);
if (decoder.getReceiverCode() === receiverCode) {
@@ -115,7 +116,8 @@ public class InvocationDirector
{
_clobj.startTransaction();
try {
for (var itr :IViewCursor = _reclist.getCursor(); itr.moveNext(); ) {
for (var itr :IViewCursor = _reclist.createCursor();
itr.moveNext(); ) {
var decoder :InvocationDecoder =
(itr.current as InvocationDecoder);
assignReceiverId(decoder);
@@ -24,7 +24,8 @@ public class InvocationRegistration
public var receiverId :int;
/** Creates and initializes a registration instance. */
public function Registration (receiverCode :String, receiverId :int)
public function InvocationRegistration (
receiverCode :String, receiverId :int)
{
this.receiverCode = receiverCode;
this.receiverId = receiverId;
@@ -1,6 +1,6 @@
package com.threerings.presents.client {
import flash.util.describeType;
import flash.utils.describeType;
import mx.collections.ArrayCollection;
@@ -1,10 +1,10 @@
package com.threerings.presents.dobj {
import flash.util.StringBuilder;
import com.threerings.io.ObjectInputStream;
import com.threerings.io.ObjectOutputStream;
import com.threerings.util.StringBuilder;
/**
* An attribute changed event is dispatched when a single attribute of a
* distributed object has changed. It can also be constructed to request
@@ -21,14 +21,13 @@
package com.threerings.presents.dobj {
import flash.util.StringBuilder;
import mx.collections.IList;
import com.threerings.io.ObjectInputStream;
import com.threerings.io.ObjectOutputStream;
import com.threerings.util.StreamableArrayList;
import com.threerings.util.StringBuilder;
/**
* Used to manage and submit groups of events on a collection of
@@ -1,12 +1,11 @@
package com.threerings.presents.dobj {
import flash.util.StringBuilder;
import com.threerings.io.ObjectInputStream;
import com.threerings.io.ObjectOutputStream;
import com.threerings.io.Streamable;
import com.threerings.util.Comparable;
import com.threerings.util.StringBuilder;
import com.threerings.presents.Log;
@@ -2,11 +2,10 @@ package com.threerings.presents.dobj {
import flash.events.EventDispatcher;
import flash.util.StringBuilder;
import mx.collections.ArrayCollection;
import com.threerings.util.ClassUtil;
import com.threerings.util.StringBuilder;
import com.threerings.io.ObjectInputStream;
import com.threerings.io.ObjectOutputStream;
@@ -258,7 +257,7 @@ public class DObject // extends EventDispatcher
/**
* Calls by derived instances when a set updater method was called.
*/
protected function requestEntryUpdate (name :String, entry :DSetEntry)
protected function requestEntryUpdate (name :String, entry :DSetEntry) :void
{
// dispatch an entry updated event
postEvent(new EntryUpdatedEvent(_oid, name, entry, null));
+2 -3
View File
@@ -1,12 +1,11 @@
package com.threerings.presents.dobj {
import flash.util.StringBuilder;
import mx.utils.ObjectUtil;
import com.threerings.util.ArrayIterator;
import com.threerings.util.Equalable;
import com.threerings.util.Iterator;
import com.threerings.util.ArrayIterator;
import com.threerings.util.StringBuilder;
import com.threerings.io.ObjectInputStream;
import com.threerings.io.ObjectOutputStream;
@@ -1,10 +1,9 @@
package com.threerings.presents.dobj {
import flash.util.StringBuilder;
import com.threerings.io.ObjectInputStream;
import com.threerings.io.ObjectOutputStream;
import com.threerings.util.StringBuilder;
/**
* An element updated event is dispatched when an element of an array
@@ -1,10 +1,10 @@
package com.threerings.presents.dobj {
import flash.util.StringBuilder;
import com.threerings.io.ObjectInputStream;
import com.threerings.io.ObjectOutputStream;
import com.threerings.util.StringBuilder;
import com.threerings.presents.Log;
/**
@@ -1,10 +1,9 @@
package com.threerings.presents.dobj {
import flash.util.StringBuilder;
import com.threerings.io.ObjectInputStream;
import com.threerings.io.ObjectOutputStream;
import com.threerings.util.StringBuilder;
import com.threerings.presents.Log;
@@ -1,10 +1,10 @@
package com.threerings.presents.dobj {
import flash.util.StringBuilder;
import com.threerings.io.ObjectInputStream;
import com.threerings.io.ObjectOutputStream;
import com.threerings.util.StringBuilder;
import com.threerings.presents.Log;
/**
@@ -21,11 +21,11 @@
package com.threerings.presents.dobj {
import flash.util.StringBuilder;
import com.threerings.io.ObjectInputStream;
import com.threerings.io.ObjectOutputStream;
import com.threerings.util.StringBuilder;
/**
* Used to dispatch an invocation notification from the server to a
* client.
@@ -21,11 +21,11 @@
package com.threerings.presents.dobj {
import flash.util.StringBuilder;
import com.threerings.io.ObjectInputStream;
import com.threerings.io.ObjectOutputStream;
import com.threerings.util.StringBuilder;
/**
* Used to dispatch an invocation request from the client to the server.
*
@@ -21,11 +21,11 @@
package com.threerings.presents.dobj {
import flash.util.StringBuilder;
import com.threerings.io.ObjectInputStream;
import com.threerings.io.ObjectOutputStream;
import com.threerings.util.StringBuilder;
/**
* Used to dispatch an invocation response from the server to the client.
*
@@ -1,10 +1,10 @@
package com.threerings.presents.dobj {
import flash.util.StringBuilder;
import com.threerings.io.ObjectInputStream;
import com.threerings.io.ObjectOutputStream;
import com.threerings.util.StringBuilder;
/**
* A message event is used to dispatch a message to all subscribers of a
* distributed object without actually changing any of the fields of the
@@ -1,6 +1,6 @@
package com.threerings.presents.dobj {
import flash.util.StringBuilder;
import com.threerings.util.StringBuilder;
import com.threerings.io.ObjectInputStream;
import com.threerings.io.ObjectOutputStream;
@@ -1,10 +1,10 @@
package com.threerings.presents.dobj {
import flash.util.StringBuilder;
import com.threerings.io.ObjectInputStream;
import com.threerings.io.ObjectOutputStream;
import com.threerings.util.StringBuilder;
/**
* An object added event is dispatched when an object is added to an
* <code>OidList</code> attribute of a distributed object. It can also be
@@ -21,7 +21,7 @@
package com.threerings.presents.dobj {
import flash.util.StringBuilder;
import com.threerings.util.StringBuilder;
/**
* An object destroyed event is dispatched when an object has been removed
@@ -21,7 +21,7 @@
package com.threerings.presents.dobj {
import flash.util.StringBuilder;
import com.threerings.util.StringBuilder;
import com.threerings.io.ObjectInputStream;
import com.threerings.io.ObjectOutputStream;
@@ -1,12 +1,12 @@
package com.threerings.presents.dobj {
import flash.util.StringBuilder;
import com.threerings.io.Streamable;
import com.threerings.io.ObjectInputStream;
import com.threerings.io.ObjectOutputStream;
import com.threerings.util.StringBuilder;
import com.threerings.presents.Log;
/**
@@ -1,8 +1,7 @@
package com.threerings.presents.net {
import flash.util.StringBuilder;
import com.threerings.util.Name;
import com.threerings.util.StringBuilder;
import com.threerings.io.ObjectInputStream;
import com.threerings.io.ObjectOutputStream;
@@ -1,5 +1,7 @@
package com.threerings.presents.net {
import flash.utils.getTimer;
import com.threerings.io.ObjectOutputStream;
public class PingRequest extends UpstreamMessage
@@ -22,7 +24,7 @@ public class PingRequest extends UpstreamMessage
// documentation inherited
public override function writeObject (out :ObjectOutputStream) :void
{
_packStamp = flash.util.getTimer();
_packStamp = getTimer();
super.writeObject(out);
}
@@ -1,5 +1,7 @@
package com.threerings.presents.net {
import flash.utils.getTimer;
import com.threerings.util.Long;
import com.threerings.io.ObjectInputStream;
@@ -30,7 +32,7 @@ public class PongResponse extends DownstreamMessage
public override function readObject (ins :ObjectInputStream) :void
{
_unpackStamp = flash.util.getTimer();
_unpackStamp = getTimer();
super.readObject(ins);
// TODO: Figure out how we're really going to cope with longs
@@ -21,9 +21,8 @@
package com.threerings.presents.net {
import flash.util.StringBuilder;
import com.threerings.util.Name;
import com.threerings.util.StringBuilder;
import com.threerings.io.ObjectInputStream;
import com.threerings.io.ObjectOutputStream;