From 5f69af762d1bb3840764a942908a162f4de9f293 Mon Sep 17 00:00:00 2001 From: Ray Greenwell Date: Tue, 9 Dec 2008 02:20:48 +0000 Subject: [PATCH] Reorder the args to these adapters: success is first now, followed by failure. This has been wacked-out like this ever since I first wacked it out. Since the base class is ResultAdapter and it only takes failure, and the 'processed' function for ConfirmAdapter is optional, it seemed to make sense this way. But, we have another ResultAdapter (for non-invocation ResultListener) and it expects success first. So Mike noticed this today (I swear there was a big brouhaha about this over the summer) and beat me with my own rubber chicken. I'm not sure why I had a mental block about reordering, but let's do it! git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5583 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- src/as/com/threerings/presents/client/ConfirmAdapter.as | 7 +++++-- src/as/com/threerings/presents/client/ResultAdapter.as | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/as/com/threerings/presents/client/ConfirmAdapter.as b/src/as/com/threerings/presents/client/ConfirmAdapter.as index ccab1e6ea..6cc6e435c 100644 --- a/src/as/com/threerings/presents/client/ConfirmAdapter.as +++ b/src/as/com/threerings/presents/client/ConfirmAdapter.as @@ -24,8 +24,11 @@ package com.threerings.presents.client { public class ConfirmAdapter extends InvocationAdapter implements InvocationService_ConfirmListener { - public function ConfirmAdapter ( - failed :Function, processed :Function = null) + /** + * Construct a confirm adapter. + * The processed function may be null. + */ + public function ConfirmAdapter (processed :Function, failed :Function) { super(failed); _processed = processed; diff --git a/src/as/com/threerings/presents/client/ResultAdapter.as b/src/as/com/threerings/presents/client/ResultAdapter.as index 6af94c694..5a505e3c4 100644 --- a/src/as/com/threerings/presents/client/ResultAdapter.as +++ b/src/as/com/threerings/presents/client/ResultAdapter.as @@ -27,7 +27,7 @@ package com.threerings.presents.client { public class ResultAdapter extends InvocationAdapter implements InvocationService_ResultListener { - public function ResultAdapter (failed :Function, processed :Function) + public function ResultAdapter (processed :Function, failed :Function) { super(failed); _processed = processed;