Pakket | mx.collections |
Klasse | public class ItemResponder |
Overerving | ItemResponder Object |
Implementatie | IResponder |
Taalversie: | ActionScript 3.0 |
Productversie: | Flex 3 |
Runtimeversies: | Flash Player 9, AIR 1.1 |
mx.rpc.IResponder
interface.
It represents a responder that lets you specify methods to be
called when a request is completed, either successfully or with an error.
The class object can also lets you provide data (a token) to be used by
the responder methods.
You use an ItemResponder
object in the catch
statement
of a try block that might result in getting remote data, as shown in the following
code:
import mx.collections.ItemResponder;
//...
try
{
//...
cursor.moveNext();
}
catch(e:ItemPendingError)
{
e.addResponder(new ItemResponder(myResultFunction, myFaultFunction, {info:"..."}));
}
The result method specified must have the following signature:
public function myResultFunction(result:Object, token:Object = null):void;
The fault method specified must have the following signature:
public function myFaultFunction(error:Object, token:Object = null):void;
Any other signature will result in a runtime error.
Verwante API-elementen
Openbare eigenschappen
Openbare methoden
Methode | Gedefinieerd door | ||
---|---|---|---|
Constructs an instance of the responder with the specified data and
handlers. | ItemResponder | ||
This method is called by a service when an error has been received. | ItemResponder | ||
Geeft aan of voor een object een opgegeven eigenschap is gedefinieerd. | Object | ||
Geeft aan of een instantie van de klasse Object zich in de prototypeketen van het object bevindt dat als parameter is opgegeven. | Object | ||
Geeft aan of de opgegeven eigenschap bestaat en kan worden opgesomd. | Object | ||
This method is called by a service when the return value has been
received. | ItemResponder | ||
Stelt de beschikbaarheid van een dynamische eigenschap voor lusbewerkingen in. | Object | ||
Geeft de tekenreeksweergave van dit object weer, geformatteerd volgens de locatiespecifieke conventies. | Object | ||
Retourneert een tekenreeksrepresentatie van het opgegeven object. | Object | ||
Retourneert de primitieve waarde van het opgegeven object. | Object |
Constructordetails
ItemResponder | () | Constructor |
public function ItemResponder(result:Function, fault:Function, token:Object = null)
Taalversie: | ActionScript 3.0 |
Productversie: | Flex 3 |
Runtimeversies: | Flash Player 9, AIR 1.1 |
Constructs an instance of the responder with the specified data and handlers.
Parametersresult:Function — Function that should be called when the request has
completed successfully.
Must have the following signature:
| |
fault:Function — Function that should be called when the request has
completed with errors.
Must have the following signature:
| |
token:Object (default = null ) — Object [optional] additional information to associate with
this request. This object is passed to the result and fault functions
as their second parameter.
|
Methodedetails
fault | () | methode |
result | () | methode |
Wed Jun 13 2018, 11:42 AM Z