Remote requests of data could cause available errors in dataprovider collections like ComboBox.
These errors are because of the data is not locally available so the request is asynchronous. The situation dispatchs an ItemPendingError.
This error can be managed with ItemResponder class, so ours logic can be executed when the request is completed (or not).
A simple example:
try {
groupCollection.getItemAt(0);
} catch (ipe:ItemPendingError) {
trace("item pending error fetching admin.");
ipe.addResponder(new ItemResponder(
function (result:Object, token:Object=null):void {
groupCollection.getItemAt(0);
},
function (fault:Object, token:Object=null):void {
trace("Error while loading");
},
{info:"..."}
));
}
The ItemResponder class object can also lets you provide data (a token) to be used by the responder methods.







Freelance
Downloads
Projects
Utilities
Friends
Links
Categories
Files





