From 6294b2e9550cc1cc7c24b67052c3222a71ee0d19 Mon Sep 17 00:00:00 2001 From: Ray Greenwell Date: Tue, 16 Sep 2008 02:00:47 +0000 Subject: [PATCH] Require the 'processed' function. If you are calling a ResultListener service, you should always listen for the result! Otherwise, you are likely doing something wrong. Listen for the result, or change the service to not report a result if it's irrelevant. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5374 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- src/as/com/threerings/presents/client/ResultWrapper.as | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/as/com/threerings/presents/client/ResultWrapper.as b/src/as/com/threerings/presents/client/ResultWrapper.as index 4acd31c96..af1bb527d 100644 --- a/src/as/com/threerings/presents/client/ResultWrapper.as +++ b/src/as/com/threerings/presents/client/ResultWrapper.as @@ -30,8 +30,7 @@ package com.threerings.presents.client { public class ResultWrapper extends InvocationAdapter implements InvocationService_ResultListener { - public function ResultWrapper ( - failed :Function, processed :Function = null) + public function ResultWrapper (failed :Function, processed :Function) { super(failed); _processed = processed; @@ -40,9 +39,7 @@ public class ResultWrapper extends InvocationAdapter // documentation inherited from interface ResultListener public function requestProcessed (result :Object) :void { - if (_processed != null) { - _processed(result); - } + _processed(result); } protected var _processed :Function;