Automatically unwrap any result object that is wrapped.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4377 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -1,5 +1,7 @@
|
|||||||
package com.threerings.presents.data {
|
package com.threerings.presents.data {
|
||||||
|
|
||||||
|
import com.threerings.util.Wrapped;
|
||||||
|
|
||||||
import com.threerings.presents.client.InvocationService_ResultListener;
|
import com.threerings.presents.client.InvocationService_ResultListener;
|
||||||
|
|
||||||
public class InvocationMarshaller_ResultMarshaller
|
public class InvocationMarshaller_ResultMarshaller
|
||||||
@@ -12,8 +14,12 @@ public class InvocationMarshaller_ResultMarshaller
|
|||||||
{
|
{
|
||||||
switch (methodId) {
|
switch (methodId) {
|
||||||
case REQUEST_PROCESSED:
|
case REQUEST_PROCESSED:
|
||||||
|
var result :Object = args[0];
|
||||||
|
if (result is Wrapped) {
|
||||||
|
result = (result as Wrapped).unwrap();
|
||||||
|
}
|
||||||
(listener as InvocationService_ResultListener).requestProcessed(
|
(listener as InvocationService_ResultListener).requestProcessed(
|
||||||
args[0]);
|
result);
|
||||||
return;
|
return;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|||||||
Reference in New Issue
Block a user