適用於 Adobe® Flash® Platform 的 ActionScript® 3.0 參考
首頁  |  隱藏套件和類別清單 |  套件  |  類別  |  新增內容  |  索引  |  附錄  |  為什麼顯示英文?
篩選: 從伺服器擷取資料...
從伺服器擷取資料...
 

套件 com.adobe.gravity.utility.async 


公用方法
 函數定義自
  
addHandlers(token:com.adobe.gravity.utility.async:IToken, successHandler:Function, faultHandler:Function, weakReference:Boolean = false):void
A convenience function for adding a success and fault handler without declaring a local variable.
com.adobe.gravity.utility.async
  
Create an adapter function that calls the provided function with the provided parameters, appending any parameters passed in when it is invoked.
com.adobe.gravity.utility.async
  
Create an adapter function that calls the provided function with the provided parameters, ignoring any parameters passed in when it is invoked.
com.adobe.gravity.utility.async
  
injector(target:Object, propertyName:String):Function
A convenience method for a success handler.
com.adobe.gravity.utility.async
函數詳細資訊

addHandlers

()函數
public function addHandlers(token:com.adobe.gravity.utility.async:IToken, successHandler:Function, faultHandler:Function, weakReference:Boolean = false):void

語言版本: ActionScript 3.0
產品版本: Adobe Digital Enterprise Platform Experience Services - Client Component Framework 10
執行階段版本: AIR 1.1, Flash Player 9

A convenience function for adding a success and fault handler without declaring a local variable. Instead of

     var token:IToken = context.getService(reference);
     token.addSuccessHandler(successHandler);
     token.addFailureHandler(faultHandler);
     
this convenience function allows for
     addHandlers(context.getService(reference), successHandler, faultHandler);
     
Note that in many cases, code similar to the first example will be easier to read. However, elimination of the local variable can reduce potential confusion between multiple local IToken variables.

參數

token:com.adobe.gravity.utility.async:IToken — The token on which to add the success and fault handler.
 
successHandler:Function — The success handler.
 
faultHandler:Function — The fault handler.
 
weakReference:Boolean (default = false) — Whether to use a weak reference.

相關 API 元素

addParams

()函數 
public function addParams(func:Function, ... params):Function

語言版本: ActionScript 3.0
產品版本: Adobe Digital Enterprise Platform Experience Services - Client Component Framework 10
執行階段版本: AIR 1.1, Flash Player 9

Create an adapter function that calls the provided function with the provided parameters, appending any parameters passed in when it is invoked. The returned adapter function will accept any number of parameters to be appended.

參數

func:Function — The function to adapt.
 
... params — An arbitrary number of additional parameters to be passed to the provided function when the returned adapter function is called.

傳回值
Function — A Function object that when invoked will call the provided function with any parameters passed into it appended to the list of parameters passed into the call to addParams.

fixParams

()函數 
public function fixParams(func:Function, ... params):Function

語言版本: ActionScript 3.0
產品版本: Adobe Digital Enterprise Platform Experience Services - Client Component Framework 10
執行階段版本: AIR 1.1, Flash Player 9

Create an adapter function that calls the provided function with the provided parameters, ignoring any parameters passed in when it is invoked. The returned adapter function will accept (and ignore) any number of parameters.

參數

func:Function — The function to adapt.
 
... params — An arbitrary number of additional parameters to be passed to the provided function when the returned adapter function is called.

傳回值
Function — A Function object that when invoked will call the provided function with the list of parameters passed into the call to fixParams; any parameters passed to the return function will be ignored.

injector

()函數 
public function injector(target:Object, propertyName:String):Function

語言版本: ActionScript 3.0
產品版本: Adobe Digital Enterprise Platform Experience Services - Client Component Framework 10
執行階段版本: AIR 1.1, Flash Player 9

A convenience method for a success handler. Typical usage: commandSenderToken.addSuccessHandler( injector( this, "commandSender" ) );

參數

target:Object — The object on which to set the property.
 
propertyName:String — The name of the property to set.

傳回值
Function — A function that takes a single object as a parameter and sets that object into the specified property of the target.

[ X ]為什麼顯示英文?
「ActionScript 3.0 參考」的內容是以英文顯示

並非所有「ActionScript 3.0 參考」的內容都翻譯為所有語言。當語言元素未翻譯時,就會以英文顯示。例如,ga.controls.HelpBox 類別並沒有翻譯為任何語言。因此在參考的繁體中文版本中,ga.controls.HelpBox 類別就會以英文顯示。