From 334a490d75e410d365e4005b7e535aafba3869dc Mon Sep 17 00:00:00 2001 From: Ray Greenwell Date: Sat, 10 Feb 2007 02:01:43 +0000 Subject: [PATCH] Automatically unwrap any Wrapped arguments to any Receiver. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4548 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- .../com/threerings/presents/client/InvocationDirector.as | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/as/com/threerings/presents/client/InvocationDirector.as b/src/as/com/threerings/presents/client/InvocationDirector.as index 17e6b4bad..93a9fc228 100644 --- a/src/as/com/threerings/presents/client/InvocationDirector.as +++ b/src/as/com/threerings/presents/client/InvocationDirector.as @@ -3,6 +3,7 @@ package com.threerings.presents.client { import flash.utils.getTimer; // function import import com.threerings.util.Hashtable; +import com.threerings.util.Wrapped; import com.threerings.presents.data.InvocationMarshaller_ListenerMarshaller; @@ -237,6 +238,14 @@ 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(); + } + } + } + // log.info("Dispatching invocation notification " + // "[receiver=" + decoder.receiver + ", methodId=" + methodId + // ", args=" + StringUtil.toString(args) + "].");