ActionScript 3 AsyncToken implementation -
Looking for an example or documentation link, how a method is coming back to implement AsyncToken .
Note that there is no unnecessary token about using / consuming the returning method! I want to type these ways myself.
An unincorporated application is easy to implement:
Function doStuffLater (): Async Token {var Token: Asynchronous token = New Unsoliculate Token (empty); // This method will randomly call the responder's 'result' or 'fault' // handler. Function doStuff () {var response: string = (math.rendum ()> 0.5)? "Result": "Defects"; For each one (Respondents: IRSpender In (token.Soxster || [])) {// Remember: This is equivalent to // responder. The result (...) or responder.fault (...) respondent [feedback] ("the result was received!"); }} SetTimeout (doStuff, 1000); Return token; }
Note that you can not actually use the applyResult
and applyFault
methods, because they give the respondents a Pass the event
, when the result or the result of the mistake, the reply
Comments
Post a Comment