From 39376d9d2073df6d4bc73d8d7c02ae2120e33749 Mon Sep 17 00:00:00 2001 From: Ray Greenwell Date: Sat, 19 Aug 2006 01:05:17 +0000 Subject: [PATCH] Extend ListenerAdapter, changed the failed function to be the first arg. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4331 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- .../presents/client/ConfirmAdapter.as | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/src/as/com/threerings/presents/client/ConfirmAdapter.as b/src/as/com/threerings/presents/client/ConfirmAdapter.as index 59eab2a06..fda3b5e1a 100644 --- a/src/as/com/threerings/presents/client/ConfirmAdapter.as +++ b/src/as/com/threerings/presents/client/ConfirmAdapter.as @@ -1,27 +1,23 @@ package com.threerings.presents.client { -public class ConfirmAdapter +public class ConfirmAdapter extends InvocationAdapter implements InvocationService_ConfirmListener { - public function ConfirmAdapter (processed :Function, failed :Function) + public function ConfirmAdapter ( + failed :Function, processed :Function = null) { + super(failed); _processed = processed; - _failed = failed; } // documentation inherited from interface ConfirmListener public function requestProcessed () :void { - _processed(); - } - - // documentation inherited from interface ConfirmListener - public function requestFailed (cause :String) :void - { - _failed(cause); + if (_processed != null) { + _processed(); + } } protected var _processed :Function; - protected var _failed :Function; } }