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
This commit is contained in:
@@ -1,27 +1,23 @@
|
|||||||
package com.threerings.presents.client {
|
package com.threerings.presents.client {
|
||||||
|
|
||||||
public class ConfirmAdapter
|
public class ConfirmAdapter extends InvocationAdapter
|
||||||
implements InvocationService_ConfirmListener
|
implements InvocationService_ConfirmListener
|
||||||
{
|
{
|
||||||
public function ConfirmAdapter (processed :Function, failed :Function)
|
public function ConfirmAdapter (
|
||||||
|
failed :Function, processed :Function = null)
|
||||||
{
|
{
|
||||||
|
super(failed);
|
||||||
_processed = processed;
|
_processed = processed;
|
||||||
_failed = failed;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// documentation inherited from interface ConfirmListener
|
// documentation inherited from interface ConfirmListener
|
||||||
public function requestProcessed () :void
|
public function requestProcessed () :void
|
||||||
{
|
{
|
||||||
_processed();
|
if (_processed != null) {
|
||||||
}
|
_processed();
|
||||||
|
}
|
||||||
// documentation inherited from interface ConfirmListener
|
|
||||||
public function requestFailed (cause :String) :void
|
|
||||||
{
|
|
||||||
_failed(cause);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected var _processed :Function;
|
protected var _processed :Function;
|
||||||
protected var _failed :Function;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user