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
This commit is contained in:
Ray Greenwell
2008-09-16 02:00:47 +00:00
parent fa4d42db28
commit 6294b2e955
@@ -30,8 +30,7 @@ package com.threerings.presents.client {
public class ResultWrapper extends InvocationAdapter public class ResultWrapper extends InvocationAdapter
implements InvocationService_ResultListener implements InvocationService_ResultListener
{ {
public function ResultWrapper ( public function ResultWrapper (failed :Function, processed :Function)
failed :Function, processed :Function = null)
{ {
super(failed); super(failed);
_processed = processed; _processed = processed;
@@ -40,9 +39,7 @@ public class ResultWrapper extends InvocationAdapter
// documentation inherited from interface ResultListener // documentation inherited from interface ResultListener
public function requestProcessed (result :Object) :void public function requestProcessed (result :Object) :void
{ {
if (_processed != null) { _processed(result);
_processed(result);
}
} }
protected var _processed :Function; protected var _processed :Function;