Spot stuff in AbjectScript.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4144 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
package com.threerings.util {
|
||||
|
||||
public class ResultAdapter
|
||||
implements ResultListener
|
||||
{
|
||||
public function ResultAdapter (completed :Function, failed :Function)
|
||||
{
|
||||
_completed = completed;
|
||||
_failed = failed;
|
||||
}
|
||||
|
||||
// documentation inherited from interface ResultListener
|
||||
public function requestCompleted (obj :Object) :void
|
||||
{
|
||||
if (_completed != null) {
|
||||
_completed(obj);
|
||||
}
|
||||
}
|
||||
|
||||
// documentation inherited from interface ResultListener
|
||||
public function requestFailed (cause :Error) :void
|
||||
{
|
||||
if (_failed != null) {
|
||||
_failed(cause);
|
||||
}
|
||||
}
|
||||
|
||||
protected var _completed :Function;
|
||||
protected var _failed :Function;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user