diff --git a/src/as/com/threerings/presents/client/InvocationDirector.as b/src/as/com/threerings/presents/client/InvocationDirector.as index 93a9fc228..3d294a637 100644 --- a/src/as/com/threerings/presents/client/InvocationDirector.as +++ b/src/as/com/threerings/presents/client/InvocationDirector.as @@ -199,6 +199,8 @@ public class InvocationDirector return; } + unwrapArgs(args); + // log.info("Dispatching invocation response " + // "[listener=" + listener + ", methId=" + methodId + // ", args=" + StringUtil.toString(args) + "]."); @@ -238,13 +240,7 @@ public class InvocationDirector return; } - if (args != null) { - for (var ii :int = 0; ii < args.length; ii++) { - if (args[ii] is Wrapped) { - args[ii] = (args[ii] as Wrapped).unwrap(); - } - } - } + unwrapArgs(args); // log.info("Dispatching invocation notification " + // "[receiver=" + decoder.receiver + ", methodId=" + methodId + @@ -297,6 +293,21 @@ public class InvocationDirector // TODO: or fuck it? } + /** + * Unwrap any arguments that have arrived from the server in wrapped + * types. + */ + protected function unwrapArgs (args :Array) :void + { + if (args != null) { + for (var ii :int = 0; ii < args.length; ii++) { + if (args[ii] is Wrapped) { + args[ii] = (args[ii] as Wrapped).unwrap(); + } + } + } + } + /** * Used to generate monotonically increasing invocation request ids. */ diff --git a/src/as/com/threerings/util/Long.as b/src/as/com/threerings/util/Long.as index ac7294568..e7cc11dba 100644 --- a/src/as/com/threerings/util/Long.as +++ b/src/as/com/threerings/util/Long.as @@ -4,7 +4,7 @@ package com.threerings.util { * Equivalent to java.lang.Long. */ public class Long - implements Equalable, Wrapped + implements Equalable { public var high :int; public var low :int; @@ -30,7 +30,7 @@ public class Long return (this.high == that.high) && (this.low == that.low); } - // from Wrapped + // from Wrapped, except that we don't implement Wrapped anymore public function unwrap () :Object { return low; // TODO